From: "Nuno Sá" <noname.nuno@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Nuno Sa <nuno.sa@analog.com>, Mike Frysinger <vapier@gentoo.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-input@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 03/13] Input: adp5589-keys: add chip_info structure
Date: Wed, 02 Oct 2024 12:57:51 +0200 [thread overview]
Message-ID: <8ed2076b0db95f5400d981facd58f98ddd5fdb6b.camel@gmail.com> (raw)
In-Reply-To: <Zv0WvDCMH1-D1pdq@google.com>
On Wed, 2024-10-02 at 02:47 -0700, Dmitry Torokhov wrote:
> On Wed, Oct 02, 2024 at 11:13:05AM +0200, Nuno Sá wrote:
> > On Tue, 2024-10-01 at 07:55 -0700, Dmitry Torokhov wrote:
> > > On Tue, Oct 01, 2024 at 03:41:34PM +0200, Nuno Sa wrote:
> > > > Add a more natural chip_info structure and add it to the i2c id table
> > > > driver data so that we do not need an enum a switch() to get the
> > > > specific bits of each device.
> > > >
> > > > Signed-off-by: Nuno Sa <nuno.sa@analog.com>
> > > > ---
> > > > drivers/input/keyboard/adp5589-keys.c | 181 ++++++++++++++++++--------------
> > > > --
> > > > 1 file changed, 95 insertions(+), 86 deletions(-)
> > > >
> > > > diff --git a/drivers/input/keyboard/adp5589-keys.c
> > > > b/drivers/input/keyboard/adp5589-keys.c
> > > > index
> > > > 922d3ab998f3a5dfbaf277f10eb19e5cd1b35415..eaa5440d4f9e14352409dd880cd25435461
> > > > 2bf3
> > > > e 100644
> > > > --- a/drivers/input/keyboard/adp5589-keys.c
> > > > +++ b/drivers/input/keyboard/adp5589-keys.c
> > > > @@ -228,16 +228,20 @@ struct adp_constants {
> > > > u8 (*reg) (u8 reg);
> > > > };
> > > >
> > > > +struct adp5589_info {
> > > > + const struct adp_constants *var;
> > > > + bool support_row5;
> > >
> > > Is it possible to derive "row5" data from keymap information to avoid
> > > having this fake "adp5585-02-keys" device?
> > >
> >
> > This is not a fake device. Looking at the adp5585 datasheet you can see there's
> > module with 25 keys (without GPIO5) and another with 11 GPIOS. From the
> > datasheet:
> >
> > "- 10 configurable I/Os allowing functions such as Key pad decoding for a matrix
> > of
> > up to 5 × 5
> > - 11 GPIOs (5 × 6) with ADP5585ACxZ-01-R7 models"
>
> Ah, I misunderstood. I thought it was a runtime configuration.
>
> >
> > Why its named adp5585-02 in the driver I'm not sure. I kept the same name as the
> > i2c
> > id? Should I call it ADP5585-1 instead? Or even ADP5585-1-r7?
>
> I think this question is better answered by the DT folks.
>
> BTW, in case of not using row5 we need to describe this pin as a reset
> line for the chip, right?
>
Oh yes. I can add a reset pin to the bindings. And make it false for the model where
R5 is in place.
- Nuno Sá
next prev parent reply other threads:[~2024-10-02 10:57 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-01 13:41 [PATCH 00/13] Input: adp5589: refactor and platform_data removal Nuno Sa
2024-10-01 13:41 ` [PATCH 01/13] Input: adp5589-keys: fix NULL pointer dereference Nuno Sa
2024-10-01 14:49 ` Dmitry Torokhov
2024-10-01 13:41 ` [PATCH 02/13] Input: adp5589-keys: fix adp5589_gpio_get_value() Nuno Sa
2024-10-01 14:50 ` Dmitry Torokhov
2024-10-01 13:41 ` [PATCH 03/13] Input: adp5589-keys: add chip_info structure Nuno Sa
2024-10-01 14:55 ` Dmitry Torokhov
2024-10-02 9:13 ` Nuno Sá
2024-10-02 9:47 ` Dmitry Torokhov
2024-10-02 10:57 ` Nuno Sá [this message]
2024-10-01 13:41 ` [PATCH 04/13] Input: adp5589-keys: support gpi key events as 'gpio keys' Nuno Sa
2024-10-01 13:41 ` [PATCH 05/13] dt-bindings: input: Document adp5589 and similar devices Nuno Sa
2024-10-02 20:58 ` Rob Herring
2024-10-08 7:01 ` Nuno Sá
2024-10-01 13:41 ` [PATCH 06/13] Input: adp5589-keys: add support for fw properties Nuno Sa
2024-10-01 14:59 ` Dmitry Torokhov
2024-10-02 9:01 ` Nuno Sá
2024-10-01 13:41 ` [PATCH 07/13] Input: adp5589-keys: add guard() notation Nuno Sa
2024-10-01 13:41 ` [PATCH 08/13] Input: adp5589-keys: bail out on returned error Nuno Sa
2024-10-01 13:41 ` [PATCH 09/13] Input: adp5589-keys: refactor adp5589_read() Nuno Sa
2024-10-01 13:41 ` [PATCH 10/13] Input: adp5589-keys: fix coding style Nuno Sa
2024-10-01 13:41 ` [PATCH 11/13] Input: adp5589-keys: unify adp_constants in info struct Nuno Sa
2024-10-01 13:41 ` [PATCH 12/13] Input: adp5589-keys: make use of dev_err_probe() Nuno Sa
2024-10-01 13:41 ` [PATCH 13/13] Input: adp5589-keys: add regulator support Nuno Sa
2024-10-16 13:36 ` [PATCH 00/13] Input: adp5589: refactor and platform_data removal Nuno Sá
2024-10-18 21:30 ` Dmitry Torokhov
2024-10-19 17:18 ` Laurent Pinchart
2024-10-21 11:26 ` Nuno Sá
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8ed2076b0db95f5400d981facd58f98ddd5fdb6b.camel@gmail.com \
--to=noname.nuno@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
--cc=vapier@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).