lkml.org 
[lkml]   [2014]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [RFC V1] mfd: da9063: Add support for production silicon variant code
> From: Opensource [Steve Twiss] <stwiss.opensource@diasemi.com>
>
> Add the correct silicon variant code ID (0x5) to the driver. This
> new code is the 'production' variant code ID for DA9063.
>
> This patch will remove the older variant code ID which matches the
> pre-production silicon ID (0x3) for the DA9063 chip.
>
> There is also some small amount of correction done in this patch: it
> renames various incorrectly named variables and moves the dev_info()
> call before the variant ID test.
>
> Signed-off-by: Opensource [Steve Twiss] <stwiss.opensource@diasemi.com>
> ---
>
> drivers/mfd/da9063-core.c | 36 ++++++++++++++++++++----------------
> include/linux/mfd/da9063/core.h | 7 ++++++-
> 2 files changed, 26 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/mfd/da9063-core.c b/drivers/mfd/da9063-core.c
> index 26937cd..80ce35a 100644
> --- a/drivers/mfd/da9063-core.c
> +++ b/drivers/mfd/da9063-core.c
> @@ -1,3 +1,4 @@
> +

Unnecessary new line.

<snip>

> + da9063->model = chip_id;

Why have you gone to lengths to rename 'model' to 'chip_id' locally,
but still call it 'model' in the global container?

> diff --git a/include/linux/mfd/da9063/core.h b/include/linux/mfd/da9063/core.h
> index 2d2a0af..2265ccb 100644
> --- a/include/linux/mfd/da9063/core.h
> +++ b/include/linux/mfd/da9063/core.h
> @@ -1,3 +1,4 @@
> +

Remove this.

> /*
> * Definitions for DA9063 MFD driver
> *
> @@ -33,6 +34,10 @@ enum da9063_models {
> PMIC_DA9063 = 0x61,
> };
>
> +enum da9063_variant_codes {
> + PMIC_DA9063_BB = 0x5

Why not support both? It's only an extra few chars in the if().

> +};
> +
> /* Interrupts */
> enum da9063_irqs {
> DA9063_IRQ_ONKEY = 0,
> @@ -72,7 +77,7 @@ struct da9063 {
> /* Device */
> struct device *dev;
> unsigned short model;

Don't you want to change this to chip_id?

> - unsigned short revision;
> + unsigned char variant_code;
> unsigned int flags;
>
> /* Control interface */

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
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/

\
 
 \ /
  Last update: 2014-02-14 11:21    [W:0.096 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site