lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190319124944.rdo2qzuprisdhq6h@verge.net.au>
Date:   Tue, 19 Mar 2019 13:49:44 +0100
From:   Simon Horman <horms@...ge.net.au>
To:     Wolfram Sang <wsa+renesas@...g-engineering.com>
Cc:     linux-kernel@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
        Lee Jones <lee.jones@...aro.org>,
        Mark Brown <broonie@...nel.org>,
        Support Opensource <support.opensource@...semi.com>,
        Liam Girdwood <lgirdwood@...il.com>
Subject: Re: [PATCH 4/6] regulator: da9063: move definitions out of a header
 into the driver

On Mon, Mar 18, 2019 at 04:47:56PM +0100, Wolfram Sang wrote:
> Those definitions are only used within the driver meanwhile, so put them
> there.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@...g-engineering.com>

Reviewed-by: Simon Horman <horms+renesas@...ge.net.au>

> ---
>  drivers/regulator/da9063-regulator.c | 44 +++++++++++++++++++++++++++++++-
>  include/linux/mfd/da9063/pdata.h     | 49 ------------------------------------
>  2 files changed, 43 insertions(+), 50 deletions(-)
> 
> diff --git a/drivers/regulator/da9063-regulator.c b/drivers/regulator/da9063-regulator.c
> index 73c85039d0cf..c05859ad63d8 100644
> --- a/drivers/regulator/da9063-regulator.c
> +++ b/drivers/regulator/da9063-regulator.c
> @@ -25,7 +25,6 @@
>  #include <linux/regulator/machine.h>
>  #include <linux/regulator/of_regulator.h>
>  #include <linux/mfd/da9063/core.h>
> -#include <linux/mfd/da9063/pdata.h>
>  #include <linux/mfd/da9063/registers.h>
>  
>  
> @@ -34,6 +33,49 @@
>  	REG_FIELD(_reg, __builtin_ffs((int)_mask) - 1, \
>  		sizeof(unsigned int) * 8 - __builtin_clz((_mask)) - 1)
>  
> +/* DA9063 and DA9063L regulator IDs */
> +enum {
> +	/* BUCKs */
> +	DA9063_ID_BCORE1,
> +	DA9063_ID_BCORE2,
> +	DA9063_ID_BPRO,
> +	DA9063_ID_BMEM,
> +	DA9063_ID_BIO,
> +	DA9063_ID_BPERI,
> +
> +	/* BCORE1 and BCORE2 in merged mode */
> +	DA9063_ID_BCORES_MERGED,
> +	/* BMEM and BIO in merged mode */
> +	DA9063_ID_BMEM_BIO_MERGED,
> +	/* When two BUCKs are merged, they cannot be reused separately */
> +
> +	/* LDOs on both DA9063 and DA9063L */
> +	DA9063_ID_LDO3,
> +	DA9063_ID_LDO7,
> +	DA9063_ID_LDO8,
> +	DA9063_ID_LDO9,
> +	DA9063_ID_LDO11,
> +
> +	/* DA9063-only LDOs */
> +	DA9063_ID_LDO1,
> +	DA9063_ID_LDO2,
> +	DA9063_ID_LDO4,
> +	DA9063_ID_LDO5,
> +	DA9063_ID_LDO6,
> +	DA9063_ID_LDO10,
> +};
> +
> +/* Old regulator platform data */
> +struct da9063_regulator_data {
> +	int				id;
> +	struct regulator_init_data	*initdata;
> +};
> +
> +struct da9063_regulators_pdata {
> +	unsigned int			n_regulators;
> +	struct da9063_regulator_data	*regulator_data;
> +};
> +
>  /* Regulator capabilities and registers description */
>  struct da9063_regulator_info {
>  	struct regulator_desc desc;
> diff --git a/include/linux/mfd/da9063/pdata.h b/include/linux/mfd/da9063/pdata.h
> index 50bed4f89c1a..21a2d107f0cf 100644
> --- a/include/linux/mfd/da9063/pdata.h
> +++ b/include/linux/mfd/da9063/pdata.h
> @@ -16,55 +16,6 @@
>  #ifndef __MFD_DA9063_PDATA_H__
>  #define __MFD_DA9063_PDATA_H__
>  
> -#include <linux/regulator/machine.h>
> -
> -/*
> - * Regulator configuration
> - */
> -/* DA9063 and DA9063L regulator IDs */
> -enum {
> -	/* BUCKs */
> -	DA9063_ID_BCORE1,
> -	DA9063_ID_BCORE2,
> -	DA9063_ID_BPRO,
> -	DA9063_ID_BMEM,
> -	DA9063_ID_BIO,
> -	DA9063_ID_BPERI,
> -
> -	/* BCORE1 and BCORE2 in merged mode */
> -	DA9063_ID_BCORES_MERGED,
> -	/* BMEM and BIO in merged mode */
> -	DA9063_ID_BMEM_BIO_MERGED,
> -	/* When two BUCKs are merged, they cannot be reused separately */
> -
> -	/* LDOs on both DA9063 and DA9063L */
> -	DA9063_ID_LDO3,
> -	DA9063_ID_LDO7,
> -	DA9063_ID_LDO8,
> -	DA9063_ID_LDO9,
> -	DA9063_ID_LDO11,
> -
> -	/* DA9063-only LDOs */
> -	DA9063_ID_LDO1,
> -	DA9063_ID_LDO2,
> -	DA9063_ID_LDO4,
> -	DA9063_ID_LDO5,
> -	DA9063_ID_LDO6,
> -	DA9063_ID_LDO10,
> -};
> -
> -/* Regulators platform data */
> -struct da9063_regulator_data {
> -	int				id;
> -	struct regulator_init_data	*initdata;
> -};
> -
> -struct da9063_regulators_pdata {
> -	unsigned			n_regulators;
> -	struct da9063_regulator_data	*regulator_data;
> -};
> -
> -
>  /*
>   * RGB LED configuration
>   */
> -- 
> 2.11.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ