devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
Cc: "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	git-dev@amd.com, Sungbo Eo <mans0n@gorani.run>,
	devicetree <devicetree@vger.kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	shubhrajyoti.datta@gmail.com
Subject: Re: [PATCH 2/2] gpio: pca9570: add slg7xl45106 support
Date: Sat, 20 Aug 2022 01:39:22 +0300	[thread overview]
Message-ID: <CAHp75VcRWCKucPwXNv90h4dvsxuECStvjMUG_vLn4FwDwfFK+g@mail.gmail.com> (raw)
In-Reply-To: <20220817085550.18887-3-shubhrajyoti.datta@amd.com>

On Wed, Aug 17, 2022 at 12:10 PM Shubhrajyoti Datta
<shubhrajyoti.datta@amd.com> wrote:
>
> slg7xl45106 is a I2C GPO expander.
> Add a compatible string for the same. Also update the
> driver to write and read from it.

...

> +       struct device_node *np = client->dev.of_node;

> +       if (of_device_is_compatible(np, "dlg,slg7xl45106"))
> +               gpio->command = SLG7XL45106_GPO_REG;

Please, avoid making the driver OF dependent when there is no reason
to do that. Note, we have device property and fwnode APIs that may
cover a lot of cases for different property providers.

-- 
With Best Regards,
Andy Shevchenko

  parent reply	other threads:[~2022-08-19 22:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-17  8:55 [PATCH 0/2] gpio: pca9570: add slg7xl45106 support Shubhrajyoti Datta
2022-08-17  8:55 ` [PATCH 1/2] dt-bindings: gpio: pca9570: Add compatible for slg7xl45106 Shubhrajyoti Datta
2022-08-18  8:44   ` Krzysztof Kozlowski
2022-08-18  9:30     ` Datta, Shubhrajyoti
2022-08-18  9:44       ` Krzysztof Kozlowski
2022-08-17  8:55 ` [PATCH 2/2] gpio: pca9570: add slg7xl45106 support Shubhrajyoti Datta
2022-08-18  8:48   ` Krzysztof Kozlowski
2022-08-19 22:39   ` Andy Shevchenko [this message]
2022-08-18  8:51 ` [PATCH 0/2] " Krzysztof Kozlowski

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=CAHp75VcRWCKucPwXNv90h4dvsxuECStvjMUG_vLn4FwDwfFK+g@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=devicetree@vger.kernel.org \
    --cc=git-dev@amd.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=mans0n@gorani.run \
    --cc=robh+dt@kernel.org \
    --cc=shubhrajyoti.datta@amd.com \
    --cc=shubhrajyoti.datta@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 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).