From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: wenhua lin <wenhua.lin1994@gmail.com>
Cc: "Wenhua Lin" <Wenhua.Lin@unisoc.com>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
"Nuno Sá" <nuno.sa@analog.com>, "Arnd Bergmann" <arnd@arndb.de>,
"Samuel Holland" <samuel@sholland.org>,
"Robert Jarzmik" <robert.jarzmik@free.fr>,
"Mattijs Korpershoek" <mkorpershoek@baylibre.com>,
"Bartosz Golaszewski" <bartosz.golaszewski@linaro.org>,
"Orson Zhai" <orsonzhai@gmail.com>,
"Baolin Wang" <baolin.wang@linux.alibaba.com>,
"Chunyan Zhang" <zhang.lyra@gmail.com>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
"Xiongpeng Wu" <xiongpeng.wu@unisoc.com>
Subject: Re: [PATCH] input: keyboard: Add sprd-keypad driver
Date: Fri, 11 Aug 2023 12:33:16 +0300 [thread overview]
Message-ID: <ZNYAXK69CIiBhiRT@smile.fi.intel.com> (raw)
In-Reply-To: <CAB9BWhd6cmYSGXF33hKMq6x0USm+tjFCKLZHRvj7aPXuomDzng@mail.gmail.com>
On Fri, Aug 11, 2023 at 03:31:01PM +0800, wenhua lin wrote:
> On Thu, Aug 10, 2023 at 10:01 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > On Thu, Aug 10, 2023 at 08:42:36PM +0800, wenhua lin wrote:
> > > On Tue, Aug 8, 2023 at 9:51 PM Andy Shevchenko
> > > <andriy.shevchenko@linux.intel.com> wrote:
> > > > On Tue, Aug 08, 2023 at 03:25:01PM +0800, Wenhua Lin wrote:
...
> > > > > + u32 rows_en; /* enabled rows bits */
> > > > > + u32 cols_en; /* enabled cols bits */
> > > >
> > > > Why not bitmaps?
> > >
> > > Bitmap has been used, each bit represents different rows and different columns.
> >
> > I meant the bitmap type (as of bitmap.h APIs).
>
> I understand what you mean, I need to study how this bitmap is used.
Input subsystem already is using them.
...
> > > > > +static int sprd_keypad_parse_dt(struct device *dev)
> > > >
> > > > dt -> fw
> > >
> > > I don't quite understand what you mean,。
> > > is it to change the function name to sprd_keypad_parse_fw?
> >
> > Yes. And make it firmware (which may be ACPI/DT or something else).
>
> We need to think about how to modify it.
As I told already, replace mention of "DT"/"OF" by "firmware" and use device
property APIs as per property.h.
...
> > > > And I'm wondering if input subsystem already does this for you.
> > >
> > > I don't quite understand what you mean.
> >
> > Does input subsystem parse the (some of) device properties already?
>
> Yes
Does it cover what you are parsing here? At least partially...
...
> > > > > +err_free:
> > > > > + devm_kfree(&pdev->dev, data);
> > > >
> > > > Huh?!
> >
> > It's a red flag, and you have no answer to it...
>
> I realized the problem, the interface using devm_ does not need to do the free.
> I will fix this issue in patch v2.
The problem is to understand where you can and where you can't use devm_*()
in the first place. _Then_ as you said.
> > > > > + return ret;
...
> > > > > + .owner = THIS_MODULE,
> > > >
> > > > ~15 years this is not needed.
> > > > Where did you get this code from? Time machine?
> > >
> > > Do you mean the keypad driver is no longer in use?
> >
> > No, I meant specifically emphasized line.
>
> The keypad driver code is used on the platform
> and has not been submitted to the community.
I'm not sure I understand to what you reply here...
I'm talking about the "owner" member assignment in the respective
data structure.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2023-08-11 9:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-08 7:25 [PATCH] input: keyboard: Add sprd-keypad driver Wenhua Lin
2023-08-08 8:02 ` Arnd Bergmann
2023-08-10 7:48 ` wenhua lin
2023-08-08 9:07 ` Jonathan Cameron
2023-08-08 13:53 ` Andy Shevchenko
2023-08-11 2:48 ` wenhua lin
2023-08-08 9:32 ` Chunyan Zhang
2023-08-10 8:05 ` wenhua lin
2023-08-08 13:51 ` Andy Shevchenko
2023-08-10 12:42 ` wenhua lin
2023-08-10 14:00 ` Andy Shevchenko
2023-08-11 7:31 ` wenhua lin
2023-08-11 9:33 ` Andy Shevchenko [this message]
2023-08-08 20:40 ` Randy Dunlap
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=ZNYAXK69CIiBhiRT@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=Wenhua.Lin@unisoc.com \
--cc=arnd@arndb.de \
--cc=baolin.wang@linux.alibaba.com \
--cc=bartosz.golaszewski@linaro.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=mkorpershoek@baylibre.com \
--cc=nuno.sa@analog.com \
--cc=orsonzhai@gmail.com \
--cc=robert.jarzmik@free.fr \
--cc=samuel@sholland.org \
--cc=wenhua.lin1994@gmail.com \
--cc=xiongpeng.wu@unisoc.com \
--cc=zhang.lyra@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.