From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756218Ab0JTXMu (ORCPT ); Wed, 20 Oct 2010 19:12:50 -0400 Received: from hqemgate03.nvidia.com ([216.228.121.140]:8755 "EHLO hqemgate03.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754178Ab0JTXMt convert rfc822-to-8bit (ORCPT ); Wed, 20 Oct 2010 19:12:49 -0400 X-PGP-Universal: processed; by hqnvupgp02.nvidia.com on Wed, 20 Oct 2010 16:12:44 -0700 From: Rhyland Klein To: Rhyland Klein , Mark Brown CC: "cboutatmailru@gmail.com" , Andrew Chew , "olof@lixom.net" , "linux-tegra@vger.kernel.org" , "linux-kernel@vger.kernel.org" Date: Wed, 20 Oct 2010 16:07:23 -0700 Subject: RE: [PATCH 1/1] power: bq24617: Adding initial charger support Thread-Topic: [PATCH 1/1] power: bq24617: Adding initial charger support Thread-Index: ActwA0M/yhGpE0igR4ybrf6+x/IxCQAewgKQAAtGM9A= Message-ID: References: <1287541031-17409-1-git-send-email-rklein@nvidia.com> <20101020030235.GA25392@sirena.org.uk> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel- > owner@vger.kernel.org] On Behalf Of Rhyland Klein > Sent: Wednesday, October 20, 2010 10:52 AM > To: Mark Brown > Cc: cboutatmailru@gmail.com; Andrew Chew; olof@lixom.net; linux- > tegra@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: RE: [PATCH 1/1] power: bq24617: Adding initial charger support > > > From: Mark Brown [mailto:broonie@opensource.wolfsonmicro.com] > > Sent: Tuesday, October 19, 2010 8:03 PM > > To: Rhyland Klein > > Cc: cboutatmailru@gmail.com; Andrew Chew; olof@lixom.net; linux- > > tegra@vger.kernel.org; linux-kernel@vger.kernel.org > > Subject: Re: [PATCH 1/1] power: bq24617: Adding initial charger support > > > > On Tue, Oct 19, 2010 at 07:17:11PM -0700, rklein@nvidia.com wrote: > > > From: Rhyland Klein > > > > > > Initial checkin adding basic support for the TI BQ24617 battery charger > > on the > > > Nvidia Tegra architecture. > > > > Why is this driver dependant on the CPU? I can't see anything in the > > code that makes it so. > > In hindsight this isn't the most accurate statement. The driver itself is > not dependent on the CPU, it is dependent on the platform design, and in > particular requires the PG line to be piped in through a GPIO. Would it > make more sense to make the driver dependent on GPIO instead? > Sorry for the confusion on this, I am removing the TEGRA dependency as it isn't necessary. > > > > > + if (old_status != -1 && > > > + old_status != new_status) { > > > + dev_dbg(&chip->pdev->dev, > > > + "%s: %i -> %i\n", __func__, old_status, > > > + new_status); > > > + kobject_uevent(&chip->power_supply.dev->kobj, KOBJ_CHANGE); > > > > power_supply_changed(). > > Alright. > > > > > > +static irqreturn_t bq24617_irq_switch(int irq, void *devid) > > > +{ > > > + struct bq24617_info *chip = devid; > > > + > > > + schedule_work(&chip->ac_work); > > > + > > > + return IRQ_HANDLED; > > > +} > > > > You're looking for a threaded IRQ handler here - use > > request_threaded_irq() with no primary handler. > > Alright I will look into this. > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/