From: Rhyland Klein <rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Anton Vorontsov <cbouatmailru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org"
<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 2/2] Added parameter for selection power supply name from pdata
Date: Mon, 05 Dec 2011 15:58:02 -0800 [thread overview]
Message-ID: <1323129482.24760.0.camel@rklein-linux2> (raw)
In-Reply-To: <1323129423-24705-2-git-send-email-rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
On Mon, 2011-12-05 at 15:57 -0800, Rhyland Klein wrote:
> Change-Id: Ib0a41ff9ac8c1fc97aa7a87320f8d95be7988d71
> Signed-off-by: Rhyland Klein <rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
> drivers/power/sbs-battery.c | 2 +-
> include/linux/power/sbs-battery.h | 2 ++
> 2 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/power/sbs-battery.c b/drivers/power/sbs-battery.c
> index 1e60a54..567b8c1 100644
> --- a/drivers/power/sbs-battery.c
> +++ b/drivers/power/sbs-battery.c
> @@ -615,7 +615,7 @@ static int __devinit sbs_probe(struct i2c_client *client,
> chip->client = client;
> chip->enable_detection = false;
> chip->gpio_detect = false;
> - chip->power_supply.name = "battery";
> + chip->power_supply.name = (pdata->power_supply_name ? : "battery");
> chip->power_supply.type = POWER_SUPPLY_TYPE_BATTERY;
> chip->power_supply.properties = sbs_properties;
> chip->power_supply.num_properties = ARRAY_SIZE(sbs_properties);
> diff --git a/include/linux/power/sbs-battery.h b/include/linux/power/sbs-battery.h
> index 2b0a9d9..fa9bc89 100644
> --- a/include/linux/power/sbs-battery.h
> +++ b/include/linux/power/sbs-battery.h
> @@ -31,12 +31,14 @@
> * @i2c_retry_count: # of times to retry on i2c IO failure
> * @poll_retry_count: # of times to retry looking for new status after
> * external change notification
> + * @power_supply_name: Optional name for power supply: default: battery
> */
> struct sbs_platform_data {
> int battery_detect;
> int battery_detect_present;
> int i2c_retry_count;
> int poll_retry_count;
> + const char *power_supply_name;
> };
>
> #endif
Oops, ignore these, proper patches coming soon.
-rhyland
prev parent reply other threads:[~2011-12-05 23:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-05 23:57 [PATCH 1/2] power: sbs-battery: Rename bq20z75 to sbs-battery Rhyland Klein
2011-12-05 23:57 ` [PATCH 2/2] Added parameter for selection power supply name from pdata Rhyland Klein
[not found] ` <1323129423-24705-2-git-send-email-rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-12-05 23:58 ` Rhyland Klein [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=1323129482.24760.0.camel@rklein-linux2 \
--to=rklein-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
--cc=cbouatmailru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 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).