Re: [RFC V1] mfd: da9063: Add support for production silicon variant code
From: Lee Jones
Date: Fri Feb 14 2014 - 04:34:56 EST
> From: Opensource [Steve Twiss] <stwiss.opensource@xxxxxxxxxxx>
>
> 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@xxxxxxxxxxx>
> ---
>
> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/