All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Joel Stanley <joel@jms.id.au>
Cc: devicetree@vger.kernel.org, Jeremy Kerr <jk@ozlabs.org>,
	linux-hwmon@vger.kernel.org
Subject: Re: [PATCH] hwmon: (adm1031) Add device tree support
Date: Tue, 29 Mar 2016 07:20:29 -0700	[thread overview]
Message-ID: <56FA8F2D.3040703@roeck-us.net> (raw)
In-Reply-To: <CACPK8XdyB2mwswJu8=EVjf9519fwBxhrrkkMSn3=JGSqiAY_Dw@mail.gmail.com>

Hi Joel,

On 03/29/2016 02:34 AM, Joel Stanley wrote:
> Hello Guenter,
>
> On Tue, Mar 29, 2016 at 7:44 PM, Guenter Roeck <linux@roeck-us.net> wrote:
>> On 03/29/2016 01:50 AM, Joel Stanley wrote:
>>>
>>> This adds a of_device_id table so we can probe the driver using the
>>> device tree.
>>>
>> The subject line does not match the driver being modified; it suggests
>> adm1031
>> while in reality the adm1275 driver is being modified.
>
> Apologies, that's what I get for writing a patch as I'm walking out the door.
>
>> Besides, this should already work, through trivial bindings.
>> Is there a reason to believe that it does not already work ?
>
> I wasn't aware that we had such a mechanism, thank you. I assume you
> referring to bindings/i2c/trival-devices.txt?
>
Yes, and the associated mechanism.

> As background for why I added the bindings; originally this code was
> patch one of two. The second added a device tree property to inform
> the kernel of the external sense resistor so we could perform scaling
> in the kernel.
>
Add the bindings (all of them) in patch 1, and the code (all of it) in patch 2.

> I read the hwmon documentation on why this is not currently done.
> However, as the device tree is specific to a board - things like i2c
> addresses and which bus they are on - I was wondering if you would
> take patches to add such a feature?
>
Yes. Search for "shunt-resistor", which is already used for some of the
TI devices. Also see Documentation/devicetree/bindings/hwmon/ina2xx.txt.

Guenter


      reply	other threads:[~2016-03-29 14:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-29  8:50 [PATCH] hwmon: (adm1031) Add device tree support Joel Stanley
2016-03-29  9:14 ` Guenter Roeck
2016-03-29  9:34   ` Joel Stanley
2016-03-29  9:34     ` Joel Stanley
2016-03-29 14:20     ` Guenter Roeck [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=56FA8F2D.3040703@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=devicetree@vger.kernel.org \
    --cc=jk@ozlabs.org \
    --cc=joel@jms.id.au \
    --cc=linux-hwmon@vger.kernel.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 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.