linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Sungbo Eo <mans0n@gorani.run>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Michael Walle <michael@walle.cc>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH v4 1/2] gpio: add GPO driver for PCA9570
Date: Sat, 4 Jul 2020 13:05:57 +0300	[thread overview]
Message-ID: <CAHp75VfJi2a4pBu_3qE=nsRZ=5udSNZ6gsKct6sB51WPvQAA3Q@mail.gmail.com> (raw)
In-Reply-To: <f7a1960b-97b8-4a09-20bf-452e29307257@gorani.run>

On Fri, Jul 3, 2020 at 3:13 AM Sungbo Eo <mans0n@gorani.run> wrote:
> On 2020-07-02 21:36, Andy Shevchenko wrote:
> >> +       gpio->chip.ngpio = i2c_match_id(pca9570_id_table, client)->driver_data;
> >
> > Oh, avoid direct access to the table like this. And you may simply use
> > device_get_match_data().
>
> I'm not sure if it really does the same thing, but I'll try following
> your suggestion.

It's an agnostic way to get it from fwnode enumerated devices. Since
you are using ->probe_new() the driver should rely on fwnode, that's
why the OF table has to have driver data be defined.

-- 
With Best Regards,
Andy Shevchenko

      reply	other threads:[~2020-07-04 10:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-02 12:17 [PATCH v4 1/2] gpio: add GPO driver for PCA9570 Sungbo Eo
2020-07-02 12:36 ` Andy Shevchenko
2020-07-02 12:38   ` Andy Shevchenko
2020-07-03  0:12   ` Sungbo Eo
2020-07-04 10:05     ` Andy Shevchenko [this message]

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='CAHp75VfJi2a4pBu_3qE=nsRZ=5udSNZ6gsKct6sB51WPvQAA3Q@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mans0n@gorani.run \
    --cc=michael@walle.cc \
    /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).