[alsa-devel] [PATCH 3/4] Convert WM97xx driver to use platform_data

Marek Vasut marek.vasut at gmail.com
Fri Jul 24 23:03:01 CEST 2009


Dne Pá 24. července 2009 21:44:01 Robert Jarzmik napsal(a):
> Marek Vasut <marek.vasut at gmail.com> writes:
> > Dne St 22. července 2009 13:01:03 Marek Vasut napsal(a):
> >> Ok,
> >> Im sending the set again.
> >
> > This one should be acked by Anton already.
> >
> > From 54febe82847aeef3fcc02a074fd9d21def97f174 Mon Sep 17 00:00:00 2001
> > From: Marek Vasut <marek.vasut at gmail.com>
> > Date: Tue, 21 Jul 2009 18:52:28 +0200
> > Subject: [PATCH 3/4] Convert WM97xx driver to use platform_data
> >
> > This patch converts the wm97xx driver to use platform_data supplied by
> > ac97 bus. Also, this fixes the related wm97xx-battery driver to use
> > it's platform_data and prepares a structure for touchscreen driver.
> >
> > Signed-off-by: Marek Vasut <marek.vasut at gmail.com>
> >
> > @@ -97,6 +105,7 @@ static void wm97xx_bat_external_power_changed(struct
> > power_supply *bat_ps) static void wm97xx_bat_update(struct power_supply
> > *bat_ps)
> >  {
> >  	int old_status = bat_status;
> > +	struct wm97xx_batt_pdata *pdata = dev_get_drvdata(bat_ps->dev->parent);
>
> Are you sure of this line ?
> Because when I add this line next to it :
> 	printk(KERN_INFO "RJK: charge_gpio = %d\n", pdata->charge_gpio);
> I get :
> [  160.079239] power_supply mioa701_battery: prop VOLTAGE_NOW=4012
> [  160.089767] power_supply mioa701_battery: prop VOLTAGE_MAX=4032
> [  160.099772] power_supply mioa701_battery: prop VOLTAGE_MIN=3072
> [  160.111776] RJK: charge_gpio = 260440062
>
> Needless to say that my kernel doesn't boot in that case (because of the
> following gpio_get_value()). I was expecting to have "-1" in my printk.

Argh ... right. Thanks, try attached patch.
>
> Cheers.
>
> --
> Robert

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Convert-WM97xx-battery-to-use-platform_data.patch
Type: text/x-patch
Size: 5282 bytes
Desc: not available
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20090724/a7d12581/attachment-0001.patch 


More information about the Alsa-devel mailing list