Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3169961yba; Mon, 22 Apr 2019 21:55:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqzk82LI+lbeGUxotJH8xzCBUiSkBnIgv4A/OlzuISJs6LH+x/4yGOsVHzKgxfSPXN0qZeTk X-Received: by 2002:a65:5687:: with SMTP id v7mr22644381pgs.299.1555995359259; Mon, 22 Apr 2019 21:55:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555995359; cv=none; d=google.com; s=arc-20160816; b=Vmj9wsYe7aGxayQ4u7uHs3rgC1fDhvxkLkjmw2Z/1eVNGSUaX0Pj7aeE6uFXpB8bjs RveryXabyAz8K8ICv8OR8mMkyktMkuLJL5RE7b9aFH04QiHRqYL/NXor39KI1fVeVqW7 K6DvA96HqM9Ot5DJvgi72t9DpUf6nEBWTN6YXKoGhm7PIyifeeNOu8dtOuNC1Vnpgla2 JfTBXXiJjG2sd84w1ryCUW/EF2vTGi8+jbyn6rVBeX/pl56hbweJgGYDgH4kHfSAjTF0 UF0aHi6BFZFSnb96wnvea9qZrHjVm3dUoJrPcROmpJu2gUA3ygV+oZvBVm3X6MYvxYZj ROPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ui4DTlvvsTyvZplA6sq6N91nIHR2APQX8fBAVRQsWC4=; b=rHcH0LD+yyNObfpWHSXOICCi3Ysi4JYDlYUsT/+s96PNAlCP4zFZv8JIKMNZAgLB+c /nYgSTOGhlHfvq48ycHcOiniZ3BYNPPxM1XpF/WDm3NON4/Qg+T3a4fzRoJ48chfbC2m VS60IXUeJAB34k/IL+h3L6ZjvK4Sxcy+fxsOh5lmKr87N1QMwhcSqIPO0j+XKyZIP/Lq SvYvS+dY3Wrk04QYbsO4cg5HeCet5FKVXAZW+Tu/plGHSR28uUCDE/KcabCiGpLQk0LP HlUgTDC9SrcsAmcAz1l2lTX5Zv4qSst4t8AvdpORRPeEb7Rg7FM8cmDzf0KhKYykfeK/ qOSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=idEkbiUL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b9si13333918pgw.263.2019.04.22.21.55.43; Mon, 22 Apr 2019 21:55:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=idEkbiUL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729647AbfDWDeh (ORCPT + 99 others); Mon, 22 Apr 2019 23:34:37 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:41325 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729097AbfDWDeh (ORCPT ); Mon, 22 Apr 2019 23:34:37 -0400 Received: by mail-pl1-f194.google.com with SMTP id d9so846797pls.8; Mon, 22 Apr 2019 20:34:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ui4DTlvvsTyvZplA6sq6N91nIHR2APQX8fBAVRQsWC4=; b=idEkbiULEDagNGekBxqTWtLZA6xkWXzX0Gj2qmRr7+ZPCQHXyZUMSU98AanknUBBUE 6effExBlQerih+Vh2K5x+r8rG1MQrxfZNP0c8hakLPYvGezE5r20OU4mJF2BJ8QrBQKh S1hmM+B1PCzI8E5dqcugfdno20mt4ZVF80JYFNzPFf1lIQ5D0catBIShLTBpHJpFZQ1g g1TTJepd+YYm7zPrkdZxm0IqbVhVIKwEbr/d0E9FwcuRNwBG2WmOtnQshXSnwGrbVB5g fso8tV71WULITxamc7Gx0zWHq8WS5uXqvH6Vc5Zs9ITVTU/C/YbYxxr5dHEf9j/7Gysw IZZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ui4DTlvvsTyvZplA6sq6N91nIHR2APQX8fBAVRQsWC4=; b=MD8IkiM3Mh3YgiMLxC10JBsNEJlv04IiGLq7t2AiokBiB9UZZrCicPqqiWcsqajUWc Mz0JN9uTo2Mk939Qa02AJzOIvJOt8WSGVOeH+w4bbJsqNLS45Z+6vJBdWoVQOl61f9a6 hcZeg1UKbMAIlFHhcaWWBpjRFTEU6aKZ1+9xywe0ZxrrCHeoduY7hVrB9paYdrrF/m3r 2+1aOdnTT8exJ0aMBZ23wIj/0iGGV6MGOv2rVt52rcQI/CtfNTan+Cb9fSdjqgnSOr0I 70DBdvtBNGEg1kRvA0SnJCqbM+ISMWL5WiN1KAVkduxFNgkO08gEtsG6IE72FMGbGkqn 6Qrw== X-Gm-Message-State: APjAAAXEWNJnXB0UxNmpDHs417/vpC5TCe2c6qDTKePoqrdqfMcY4cAY vuTL5jDDj6607NPvwaAnXhc= X-Received: by 2002:a17:902:e393:: with SMTP id ch19mr23903010plb.117.1555990476586; Mon, 22 Apr 2019 20:34:36 -0700 (PDT) Received: from localhost ([172.56.31.226]) by smtp.gmail.com with ESMTPSA id d20sm18826127pfo.77.2019.04.22.20.34.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Apr 2019 20:34:35 -0700 (PDT) Date: Tue, 23 Apr 2019 03:22:26 +0000 From: Dmitry Torokhov To: Arnd Bergmann Cc: Hartley Sweeten , Alexander Sverdlin , Linus Walleij , Stefan Agner , Enric Balletbo i Serra , Guenter Roeck , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/4] ARM: ep93xx: keypad: stop using mach/platform.h Message-ID: <20190423032226.cqbik3hicjomgzqs@penguin> References: <20190415192734.935387-1-arnd@arndb.de> <20190415192734.935387-2-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190415192734.935387-2-arnd@arndb.de> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 15, 2019 at 09:25:24PM +0200, Arnd Bergmann wrote: > We can communicate the clock rate using platform data rather than setting > a flag to use a particular value in the driver, which is cleaner and > avoids the dependency. > > No platform in the kernel currently defines the ep93xx keypad device > structure, so this is a rather pointless excercise. Any out of tree > users are probably dead now, but if not, they have to change their > platform code to match the new platform_data structure. > > Signed-off-by: Arnd Bergmann Acked-by: Dmitry Torokhov Please feel free to merge with the rest of the patches. > --- > drivers/input/keyboard/Kconfig | 2 +- > drivers/input/keyboard/ep93xx_keypad.c | 5 +---- > include/linux/platform_data/keypad-ep93xx.h | 4 ++-- > 3 files changed, 4 insertions(+), 7 deletions(-) > > diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig > index a878351f1643..b373f3274542 100644 > --- a/drivers/input/keyboard/Kconfig > +++ b/drivers/input/keyboard/Kconfig > @@ -194,7 +194,7 @@ config KEYBOARD_LKKBD > > config KEYBOARD_EP93XX > tristate "EP93xx Matrix Keypad support" > - depends on ARCH_EP93XX > + depends on ARCH_EP93XX || COMPILE_TEST > select INPUT_MATRIXKMAP > help > Say Y here to enable the matrix keypad on the Cirrus EP93XX. > diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c > index f77b295e0123..71472f6257c0 100644 > --- a/drivers/input/keyboard/ep93xx_keypad.c > +++ b/drivers/input/keyboard/ep93xx_keypad.c > @@ -137,10 +137,7 @@ static void ep93xx_keypad_config(struct ep93xx_keypad *keypad) > struct ep93xx_keypad_platform_data *pdata = keypad->pdata; > unsigned int val = 0; > > - if (pdata->flags & EP93XX_KEYPAD_KDIV) > - clk_set_rate(keypad->clk, EP93XX_KEYTCHCLK_DIV4); > - else > - clk_set_rate(keypad->clk, EP93XX_KEYTCHCLK_DIV16); > + clk_set_rate(keypad->clk, pdata->clk_rate); > > if (pdata->flags & EP93XX_KEYPAD_DISABLE_3_KEY) > val |= KEY_INIT_DIS3KY; > diff --git a/include/linux/platform_data/keypad-ep93xx.h b/include/linux/platform_data/keypad-ep93xx.h > index 0e36818e3680..3054fced8509 100644 > --- a/include/linux/platform_data/keypad-ep93xx.h > +++ b/include/linux/platform_data/keypad-ep93xx.h > @@ -9,8 +9,7 @@ struct matrix_keymap_data; > #define EP93XX_KEYPAD_DIAG_MODE (1<<1) /* diagnostic mode */ > #define EP93XX_KEYPAD_BACK_DRIVE (1<<2) /* back driving mode */ > #define EP93XX_KEYPAD_TEST_MODE (1<<3) /* scan only column 0 */ > -#define EP93XX_KEYPAD_KDIV (1<<4) /* 1/4 clock or 1/16 clock */ > -#define EP93XX_KEYPAD_AUTOREPEAT (1<<5) /* enable key autorepeat */ > +#define EP93XX_KEYPAD_AUTOREPEAT (1<<4) /* enable key autorepeat */ > > /** > * struct ep93xx_keypad_platform_data - platform specific device structure > @@ -24,6 +23,7 @@ struct ep93xx_keypad_platform_data { > unsigned int debounce; > unsigned int prescale; > unsigned int flags; > + unsigned int clk_rate; > }; > > #define EP93XX_MATRIX_ROWS (8) > -- > 2.20.0 > -- Dmitry