lkml.org 
[lkml]   [2010]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Intel MID platform battery driver. (right patch this time)
On Thu, Jun 17, 2010 at 06:12:36PM +0100, Alan Cox wrote:
> Oops sorry - try the right version this time.
>
> From: Nithish Mahalingam <nithish.mahalingam@intel.com>
>
> The PMIC Battery driver provides battery charging and battery gauge
> functionality on Intel MID platforms. This provides the basic functions. There
> are some USB drivers to merge before the selection of charging between the
> different USB power levels can be enabled.
>
> Moved to a platform device by Alek Du.
>
> Signed-off-by: Nithish Mahalingam <nithish.mahalingam@intel.com>
> Signed-off-by: Alan Cox <alan@linux.intel.com>

Applied to battery-2.6.git, thanks.

However, note that there's another issue that should be fixed
both in this driver and in the platform (or SPI device driver)
code.

[...]
> +static __devinit int probe(int irq, struct device *dev)

Notice 'int irq' here.

[...]
> +static int __devinit platform_pmic_battery_probe(struct platform_device *pdev)
> +{
> + return probe(pdev->id, &pdev->dev);

So the irq number is derived from the platform device ID.
Which is very bizarre, and not how things supposed to work.
I guess there should be an IRQ resource for the device
instead.

--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2


\
 
 \ /
  Last update: 2010-06-17 20:31    [W:0.035 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site