Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2525000yba; Mon, 15 Apr 2019 13:34:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwQElBAp5q8EwUYwq5hfRFf9IE0kkGZlD5OCTdPTIGpks9gwg9BA6bCJWYGVGDSnQiJwQzi X-Received: by 2002:a63:195e:: with SMTP id 30mr71714719pgz.312.1555360454349; Mon, 15 Apr 2019 13:34:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555360454; cv=none; d=google.com; s=arc-20160816; b=oeA65Lc24VFbfijaScyAI66OEzWIep968kwZodlG7KvP3XKIcR2keRVfN48baZDnHA 2nplKpuQHyGFhCuWaHtLcRIAJuFxfjlnVqg0GEtovn2YK/dp3q9z4MP0C3XGqE65yJax XQ8/qc2ExRdYIf+crbPtEu755tNr2qrSpH+xoTlZOmgnGjI6YvDSnqe6QM0YD5Q1nTPg V39vnaYu9wMFJwP4cmjTzXGPpYahF7w6kWm0f3A0jKUpweCoDlMRlABCpX6mVTyeIIKe istMXooO+UsLBjoQTjpgdj9FGFdmrNO5N3Yfl4wgaljA97d9cIOqBxa60ROlgsyDl0wk SNdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=wIk65o+RO0GXjCOm+Angc753gmqOE8dlMvOLS/9D4ls=; b=DWsUD8PGEc1Mla6yJa4EfGKQpO1f+OKCkf9OX9NK/QVNlpdqamkMJmNT2XVqtAumx0 Kk4YE+1P/rmOCvrPdb8bW/Zo+RxaeNoVHKUWwAjciMf3Pb42mmWuU8hDC+oPG5bAo6Cf W7fLxdniK1UHojAn6qbhH0Sts9O7BD5jrrZXFS7/urdqvAVcONsUgD92rtTog30ckve3 3L+hWioV0Uo+82mh6kyRuNLXHmaPq76lnqnbmkhMqu82PRE+s15i18aj1hXAvTiUKp6U 4hVHXE06Zqj96fSn41MqwtJmlFwk/wm5iR2k+t2qUpSKTbJamxMSVtqS2JZeA5+6C9UZ rdgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JZcVgi2w; 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 ba5si15884748plb.24.2019.04.15.13.33.58; Mon, 15 Apr 2019 13:34:14 -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=JZcVgi2w; 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 S1728856AbfDOT4Y (ORCPT + 99 others); Mon, 15 Apr 2019 15:56:24 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:33874 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728347AbfDOT4X (ORCPT ); Mon, 15 Apr 2019 15:56:23 -0400 Received: by mail-wm1-f68.google.com with SMTP id r186so704773wmf.1; Mon, 15 Apr 2019 12:56:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=wIk65o+RO0GXjCOm+Angc753gmqOE8dlMvOLS/9D4ls=; b=JZcVgi2w/siujD5wC49nOZKOqGAYoYcbzgNq9zfqiwzdzV0zfuhwBrqIMThC0FqQAH IZpEcd3ivbRMeqsrotU2qXQVOf0I4z+SbjBytWvsYTb7mFwxXs+stNU9aTP7NdwnaKbO ne+Nt1X+om7X/Prf09dm5tNUNoiKTay5FtZRHrMedTPD010ggqk44PMlrCG/MrFxVana OuEs/8XMsHd2yrXYbQbNXBQQu1+gVxBqTz/d2XvOtQiA95yPxe7U0onAoERQJMExpjwG VM3xuZAZNyjxOL9BCtgKwQOd57xbarQJDkoPVo+ICVuR2peVeHu/XbLrgYUhMpllX/4M XwCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=wIk65o+RO0GXjCOm+Angc753gmqOE8dlMvOLS/9D4ls=; b=GZ7YpU8AdVS1NSbK0N+/1KyGIEZ2KevK7hiWNLKpmmwIqN4slnugEWWpwlzXvTaJR+ LJe7ufzFo7SYYu2dQHV6nv23Iy16eccK8CYcza5uPh/Xo/D8Vzir/108XrSf7yHik+e+ 6CudRv/ZIb1O+voBspm2Gxbv2FH7nz+lsE+Y6idNhXaNVgo2kyaNbLJ0f72pkEEwUcG8 Fm30r3B1EQhcqnWRQrcIBkm08NwjCE/ckuYO03mJpHTbUgjO1YwcLDHn+pYfq6qnk/pn EL2QsWmsi3wzTvsX0h3wYc+meV9o5C2y64SRPnwSN4WiJPy9yWyXB0StXe7sWxsanwyp pZWg== X-Gm-Message-State: APjAAAVGG+gyhf8bCyqF+ixClv0+xD51fogOZ7vtz+nFDVtOnDK4KoZL 1e8f2cszjTHC2+a42DtOWYobTFZQBErN9g== X-Received: by 2002:a05:600c:220b:: with SMTP id z11mr23144663wml.73.1555358181873; Mon, 15 Apr 2019 12:56:21 -0700 (PDT) Received: from [192.168.1.221] ([195.245.38.118]) by smtp.gmail.com with ESMTPSA id r16sm38548382wrx.37.2019.04.15.12.56.20 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 15 Apr 2019 12:56:21 -0700 (PDT) Subject: Re: [PATCH 2/4] ARM: ep93xx: keypad: stop using mach/platform.h To: Arnd Bergmann , Hartley Sweeten Cc: Linus Walleij , Dmitry Torokhov , Stefan Agner , Enric Balletbo i Serra , Guenter Roeck , "linux-input@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <20190415192734.935387-1-arnd@arndb.de> <20190415192734.935387-2-arnd@arndb.de> From: Alexander Sverdlin Message-ID: <3665a5ad-ff6d-97a1-ca31-971973a7167f@gmail.com> Date: Mon, 15 Apr 2019 21:54:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! On 15/04/2019 21:47, 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. >> >> >>> 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 */ >> You have re-defined the keypad register bits here. >> >> The KDIV bit changes the clock rate. The AUTOREPEAT bit enables key autorepeat. > As far as I can tell, they are not register bits, just software flags > for communicating between a board file and the driver, so I > assumed I could freely reorganize them. > > Did I miss something? They are indeed only software flags (just checked datasheet), so you are only changing platform data format. But as I do not know any keypad user in person, I'd rely on Hartley's opinion in this case (if it's a good idea to change platform data or not). -- Alex.