All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Max Staudt <max@enpas.org>
Cc: Linux I2C <linux-i2c@vger.kernel.org>,
	linux-hwmon@vger.kernel.org,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Jean Delvare <jdelvare@suse.com>,
	Guenter Roeck <linux@roeck-us.net>,
	"Linux/m68k" <linux-m68k@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Subject: Re: [PATCH] hwmon/ltc2990: Generalise DT to fwnode support
Date: Fri, 16 Aug 2019 13:07:18 +0200	[thread overview]
Message-ID: <CAMuHMdUE_3UEzOv3pmryMwuMRF7RC9-xTG8sXUbpR=r5fKUjrg@mail.gmail.com> (raw)
In-Reply-To: <20190816090731.12809-1-max@enpas.org>

Hi Max,

On Fri, Aug 16, 2019 at 11:09 AM Max Staudt <max@enpas.org> wrote:
> ltc2990 will now use device_property_read_u32_array() instead of
> of_property_read_u32_array() - allowing the use of software nodes
> via fwnode_create_software_node().
>
> This allows code using i2c_new_device() to specify a default
> measurement mode for the LTC2990 via fwnode_create_software_node().
>
> Signed-off-by: Max Staudt <max@enpas.org>

Thanks for your patch!

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>

One minor nit: as the driver no longer uses any of_*() symbols, you can replace
#include <linux/of.h> by #include <linux/property.h>.

> --- a/drivers/hwmon/ltc2990.c
> +++ b/drivers/hwmon/ltc2990.c
> @@ -206,7 +206,6 @@ static int ltc2990_i2c_probe(struct i2c_client *i2c,
>         int ret;
>         struct device *hwmon_dev;
>         struct ltc2990_data *data;
> -       struct device_node *of_node = i2c->dev.of_node;
>
>         if (!i2c_check_functionality(i2c->adapter, I2C_FUNC_SMBUS_BYTE_DATA |
>                                      I2C_FUNC_SMBUS_WORD_DATA))
> @@ -218,9 +217,10 @@ static int ltc2990_i2c_probe(struct i2c_client *i2c,
>
>         data->i2c = i2c;
>
> -       if (of_node) {
> -               ret = of_property_read_u32_array(of_node, "lltc,meas-mode",
> -                                                data->mode, 2);
> +       if (dev_fwnode(&i2c->dev)) {
> +               ret = device_property_read_u32_array(&i2c->dev,
> +                                                    "lltc,meas-mode",
> +                                                    data->mode, 2);
>                 if (ret < 0)
>                         return ret;

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2019-08-16 11:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15 12:58 [PATCH v3 1/3] i2c/busses: Add i2c-icy for I2C on m68k/Amiga Max Staudt
2019-08-15 12:58 ` [PATCH v3 2/3] hwmon/ltc2990: Generalise DT to fwnode support Max Staudt
2019-08-15 18:33   ` Guenter Roeck
2019-08-15 21:34     ` Max Staudt
2019-08-15 22:19   ` Max Staudt
2019-08-15 22:43     ` Guenter Roeck
2019-08-16  7:32       ` Geert Uytterhoeven
2019-08-16  8:37       ` Max Staudt
2019-08-16  9:07         ` [PATCH] " Max Staudt
2019-08-16 11:07           ` Geert Uytterhoeven [this message]
2019-08-16 12:26             ` Max Staudt
2019-08-16 12:36               ` Geert Uytterhoeven
2019-08-16 12:43                 ` Max Staudt
2019-08-16 13:24                   ` Guenter Roeck
2019-08-15 12:58 ` [PATCH v3 3/3] i2c/busses/i2c-icy: Add LTC2990 present on 2019 board revision Max Staudt
2019-08-16 11:51   ` Wolfram Sang
2019-08-16 12:34     ` Max Staudt
2019-08-16 16:09       ` Wolfram Sang
2019-08-19 11:22         ` Max Staudt

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='CAMuHMdUE_3UEzOv3pmryMwuMRF7RC9-xTG8sXUbpR=r5fKUjrg@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=max@enpas.org \
    --cc=wsa+renesas@sang-engineering.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.