From: Anton Vorontsov <cbouatmailru@gmail.com>
To: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] power_supply: Added support for power supply attribute sources
Date: Thu, 26 Jul 2012 10:04:11 -0700 [thread overview]
Message-ID: <20120726170411.GA19112@lizard> (raw)
In-Reply-To: <1343315844-18824-1-git-send-email-ramakrishna.pallala@intel.com>
Hello Ramakrishna,
On Thu, Jul 26, 2012 at 08:47:24PM +0530, Ramakrishna Pallala wrote:
> On some platforms one driver(or HW chip) may not be able to provide all
> the necessary attributes of the power supply connected to the platform or
> may provide very limited info which can be used by core/primary drivers.
>
> For example a temperature sensor chip placed near the battery can be used
> to report battery ambient temperature but it does not makes sense to register
> sensor driver with power supply class. Or even a ADC driver or platform
> driver may report power supply properties like voltage/current or charging
> status but registering all those driver with power supply class is not a
> practical or ideal approach.
>
> This patch adds the generic support to register the drivers as power
> supply attribute(properties) sources and adds an interface to read
> these attributes from power supply class drivers.
>
> If there are multiple attribute sources of the same type then caller has
> to do source selection by passing the source string in the query struct.
>
> Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
> ---
[...]
> +extern int power_supply_attributes_register(struct device *parent,
> + struct power_supply_attr_source *psy_attr);
Can you please show some user of the new calls? If I understand
correctly, you're going to call these from sensing (ADC, or some
other) drivers, which would be very very wrong thing to do.
Thanks,
--
Anton Vorontsov
Email: cbouatmailru@gmail.com
next prev parent reply other threads:[~2012-07-26 17:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-26 15:17 [PATCH v2] power_supply: Added support for power supply attribute sources Ramakrishna Pallala
2012-07-26 17:04 ` Anton Vorontsov [this message]
2012-07-27 18:28 ` Pallala, Ramakrishna
2012-08-06 6:42 ` Pallala, Ramakrishna
2012-08-07 4:41 ` Anton Vorontsov
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=20120726170411.GA19112@lizard \
--to=cbouatmailru@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ramakrishna.pallala@intel.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