From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Jones Subject: Re: [PATCH 3/6] mfd: add bcm59056 pmu driver Date: Tue, 4 Feb 2014 14:47:31 +0000 Message-ID: <20140204144731.GA3154@lee--X1> References: <1391516352-32359-1-git-send-email-mporter@linaro.org> <1391516352-32359-4-git-send-email-mporter@linaro.org> <20140204132951.GE13529@lee--X1> <20140204143119.GA4627@beef> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <20140204143119.GA4627@beef> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Matt Porter Cc: Wolfram Sang , Tim Kryger , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Samuel Ortiz , Liam Girdwood , Mark Brown , Christian Daudt , Devicetree List , Linux I2C List , Linux ARM Kernel List , Linux Kernel Mailing List List-Id: linux-i2c@vger.kernel.org Hold your horses. :) > > > Add a driver for the BCM59056 PMU multi-function device. The driv= er > > > initially supports regmap initialization and instantiation of the > > > voltage regulator device function of the PMU. > > >=20 > > > Signed-off-by: Matt Porter > > > Reviewed-by: Tim Kryger > > > Reviewed-by: Markus Mayer > > > --- > > > drivers/mfd/Kconfig | 8 +++ > > > drivers/mfd/Makefile | 1 + > > > drivers/mfd/bcm59056.c | 119 +++++++++++++++++++++++++++++= ++++++++++++++ > > > include/linux/mfd/bcm59056.h | 35 +++++++++++++ > > > 4 files changed, 163 insertions(+) > > > create mode 100644 drivers/mfd/bcm59056.c > > > create mode 100644 include/linux/mfd/bcm59056.h > > I thought this was a DT only driver? If so, you probably want to us= e > > of_match_device() instead. >=20 > Correct, I'll use of_match_device() If you're going to use this ... > > You've gone to the trouble of setting a device version here, but yo= u > > don't seem to use it? >=20 > I'll drop the device version =2E.. then you'll still need this. > > > +static const struct i2c_device_id bcm59056_i2c_id[] =3D { > > > + { "bcm59056", BCM59056 }, > > > + { } > > > +}; > >=20 > > Ah, I guess this is where id->driver comes from. > >=20 > > It's pretty silly that the I2C subsystem demands the presence of th= is > > table, despite not using it if an of_device_id table is present. >=20 > It does make it very difficult to follow DT enabled I2C client driver= s > :( I'll drop the BCM59056 too. And I don't think you can drop this, as the I2C subsystem still insists on it. > > > +/* chip id */ > > > +#define BCM59056 0 > >=20 > > Lonely, oh so lonely! >=20 > Understood. Will remove. I think you need to keep this to supply the silly I2C ID table. I would just omit the '.data =3D (void *) VERSION' from the of_match_table until you require it.=20 --=20 Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org =E2=94=82 Open source software for ARM SoCs =46ollow Linaro: Facebook | Twitter | Blog From mboxrd@z Thu Jan 1 00:00:00 1970 From: lee.jones@linaro.org (Lee Jones) Date: Tue, 4 Feb 2014 14:47:31 +0000 Subject: [PATCH 3/6] mfd: add bcm59056 pmu driver In-Reply-To: <20140204143119.GA4627@beef> References: <1391516352-32359-1-git-send-email-mporter@linaro.org> <1391516352-32359-4-git-send-email-mporter@linaro.org> <20140204132951.GE13529@lee--X1> <20140204143119.GA4627@beef> Message-ID: <20140204144731.GA3154@lee--X1> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hold your horses. :) > > > Add a driver for the BCM59056 PMU multi-function device. The driver > > > initially supports regmap initialization and instantiation of the > > > voltage regulator device function of the PMU. > > > > > > Signed-off-by: Matt Porter > > > Reviewed-by: Tim Kryger > > > Reviewed-by: Markus Mayer > > > --- > > > drivers/mfd/Kconfig | 8 +++ > > > drivers/mfd/Makefile | 1 + > > > drivers/mfd/bcm59056.c | 119 +++++++++++++++++++++++++++++++++++++++++++ > > > include/linux/mfd/bcm59056.h | 35 +++++++++++++ > > > 4 files changed, 163 insertions(+) > > > create mode 100644 drivers/mfd/bcm59056.c > > > create mode 100644 include/linux/mfd/bcm59056.h > > I thought this was a DT only driver? If so, you probably want to use > > of_match_device() instead. > > Correct, I'll use of_match_device() If you're going to use this ... > > You've gone to the trouble of setting a device version here, but you > > don't seem to use it? > > I'll drop the device version ... then you'll still need this. > > > +static const struct i2c_device_id bcm59056_i2c_id[] = { > > > + { "bcm59056", BCM59056 }, > > > + { } > > > +}; > > > > Ah, I guess this is where id->driver comes from. > > > > It's pretty silly that the I2C subsystem demands the presence of this > > table, despite not using it if an of_device_id table is present. > > It does make it very difficult to follow DT enabled I2C client drivers > :( I'll drop the BCM59056 too. And I don't think you can drop this, as the I2C subsystem still insists on it. > > > +/* chip id */ > > > +#define BCM59056 0 > > > > Lonely, oh so lonely! > > Understood. Will remove. I think you need to keep this to supply the silly I2C ID table. I would just omit the '.data = (void *) VERSION' from the of_match_table until you require it. -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754316AbaBDOrk (ORCPT ); Tue, 4 Feb 2014 09:47:40 -0500 Received: from mail-we0-f180.google.com ([74.125.82.180]:44054 "EHLO mail-we0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751382AbaBDOri (ORCPT ); Tue, 4 Feb 2014 09:47:38 -0500 Date: Tue, 4 Feb 2014 14:47:31 +0000 From: Lee Jones To: Matt Porter Cc: Wolfram Sang , Tim Kryger , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Samuel Ortiz , Liam Girdwood , Mark Brown , Christian Daudt , Devicetree List , Linux I2C List , Linux ARM Kernel List , Linux Kernel Mailing List Subject: Re: [PATCH 3/6] mfd: add bcm59056 pmu driver Message-ID: <20140204144731.GA3154@lee--X1> References: <1391516352-32359-1-git-send-email-mporter@linaro.org> <1391516352-32359-4-git-send-email-mporter@linaro.org> <20140204132951.GE13529@lee--X1> <20140204143119.GA4627@beef> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20140204143119.GA4627@beef> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hold your horses. :) > > > Add a driver for the BCM59056 PMU multi-function device. The driver > > > initially supports regmap initialization and instantiation of the > > > voltage regulator device function of the PMU. > > > > > > Signed-off-by: Matt Porter > > > Reviewed-by: Tim Kryger > > > Reviewed-by: Markus Mayer > > > --- > > > drivers/mfd/Kconfig | 8 +++ > > > drivers/mfd/Makefile | 1 + > > > drivers/mfd/bcm59056.c | 119 +++++++++++++++++++++++++++++++++++++++++++ > > > include/linux/mfd/bcm59056.h | 35 +++++++++++++ > > > 4 files changed, 163 insertions(+) > > > create mode 100644 drivers/mfd/bcm59056.c > > > create mode 100644 include/linux/mfd/bcm59056.h > > I thought this was a DT only driver? If so, you probably want to use > > of_match_device() instead. > > Correct, I'll use of_match_device() If you're going to use this ... > > You've gone to the trouble of setting a device version here, but you > > don't seem to use it? > > I'll drop the device version ... then you'll still need this. > > > +static const struct i2c_device_id bcm59056_i2c_id[] = { > > > + { "bcm59056", BCM59056 }, > > > + { } > > > +}; > > > > Ah, I guess this is where id->driver comes from. > > > > It's pretty silly that the I2C subsystem demands the presence of this > > table, despite not using it if an of_device_id table is present. > > It does make it very difficult to follow DT enabled I2C client drivers > :( I'll drop the BCM59056 too. And I don't think you can drop this, as the I2C subsystem still insists on it. > > > +/* chip id */ > > > +#define BCM59056 0 > > > > Lonely, oh so lonely! > > Understood. Will remove. I think you need to keep this to supply the silly I2C ID table. I would just omit the '.data = (void *) VERSION' from the of_match_table until you require it. -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog