From: Marek Vasut <marek.vasut-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Cc: David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>,
Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org,
Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
Subject: Re: [patch 2.6.27-rc3] tps65010: vibrator hookup to gpiolib
Date: Mon, 18 Aug 2008 12:32:32 +0200 [thread overview]
Message-ID: <200808181232.32646.marek.vasut@gmail.com> (raw)
In-Reply-To: <20080818111942.528f12a4-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
Dne Monday 18 of August 2008 11:19:42 Jean Delvare napsal(a):
> Hi David,
>
> On Mon, 18 Aug 2008 00:24:32 -0700, David Brownell wrote:
> > From: Marek Vasut <marek.vasut-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >
> > All the tps6501{0,1,2,3,4} chips have a signal for hooking up with
> > a vibrator (for non-auditory cell phone "ring") ... expose that as
> > one more (output-only) GPIO.
> >
> > [ dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org: comments; list tps65014 too ]
> >
> > Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
> > ---
> > drivers/i2c/chips/tps65010.c | 12 +++++++++---
> > 1 file changed, 9 insertions(+), 3 deletions(-)
> >
> > --- a/drivers/i2c/chips/tps65010.c 2008-07-25 12:28:08.000000000 -0700
> > +++ b/drivers/i2c/chips/tps65010.c 2008-08-18 00:22:48.000000000 -0700
> > @@ -456,14 +456,17 @@ static irqreturn_t tps65010_irq(int irq,
> >
> > /* offsets 0..3 == GPIO1..GPIO4
> > * offsets 4..5 == LED1/nPG, LED2 (we set one of the non-BLINK modes)
> > + * offset 6 == vibrator motor driver
> > */
> > static void
> > tps65010_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
> > {
> > if (offset < 4)
> > tps65010_set_gpio_out_value(offset + 1, value);
> > - else
> > + else if (offset < 6)
> > tps65010_set_led(offset - 3, value ? ON : OFF);
> > + else
> > + tps65010_set_vib(value);
> > }
> >
> > static int
> > @@ -477,8 +480,10 @@ tps65010_output(struct gpio_chip *chip,
> > if (!(tps->outmask & (1 << offset)))
> > return -EINVAL;
> > tps65010_set_gpio_out_value(offset + 1, value);
> > - } else
> > + } else if (offset < 6)
> > tps65010_set_led(offset - 3, value ? ON : OFF);
> > + else
> > + tps65010_set_vib(value);
> >
> > return 0;
> > }
> > @@ -646,7 +651,7 @@ static int tps65010_probe(struct i2c_cli
> > tps->chip.get = tps65010_gpio_get;
> >
> > tps->chip.base = board->base;
> > - tps->chip.ngpio = 6;
> > + tps->chip.ngpio = 7;
> > tps->chip.can_sleep = 1;
> >
> > status = gpiochip_add(&tps->chip);
> > @@ -675,6 +680,7 @@ static const struct i2c_device_id tps650
> > { "tps65011", TPS65011 },
> > { "tps65012", TPS65012 },
> > { "tps65013", TPS65013 },
> > + { "tps65014", TPS65011 }, /* tps65011 charging at 6.5V max */
> > { }
> > };
> > MODULE_DEVICE_TABLE(i2c, tps65010_id);
>
> Applied, thanks. I'm a bit worried that Marek's Signed-off-by is
> missing though.
Signed-off-by: Marek Vasut <marek.vasut-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
here you have it if you still need it :-)
_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c
prev parent reply other threads:[~2008-08-18 10:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-18 7:24 [patch 2.6.27-rc3] tps65010: vibrator hookup to gpiolib David Brownell
[not found] ` <200808180024.32954.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-08-18 9:19 ` Jean Delvare
[not found] ` <20080818111942.528f12a4-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-08-18 10:32 ` Marek Vasut [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=200808181232.32646.marek.vasut@gmail.com \
--to=marek.vasut-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org \
--cc=i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org \
--cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@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