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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 21 Jun 2015 23:17:56 +0900
From:	Chanwoo Choi <cwchoi00@...il.com>
To:	Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>
Cc:	Lee Jones <lee.jones@...aro.org>,
	"myungjoo.ham@...sung.com" <myungjoo.ham@...sung.com>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	devicetree <devicetree@...r.kernel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	patches@...nsource.wolfsonmicro.com
Subject: Re: [PATCH v5 1/7] extcon: arizona: Simplify pdata symantics for micd_dbtime

Hi Charles,

Looks good go me. But you need the review from MFD maintainer
before appling it.

Thanks,
Chanwoo Choi

On Sat, Jun 20, 2015 at 1:23 AM, Charles Keepax
<ckeepax@...nsource.wolfsonmicro.com> wrote:
> Currently micd_dbtime can be set to 0 for default, 1 for 4 measurements,
> or a greater than 16-bit value for 2 measurements. This patch simplifies
> the symantics to 2 for 2 measurements, 4 for 4 measurements and any
> other value for the default.
>
> I am not super keen on changing the symantics of the pdata at this stage
> in the drivers life, but acceptance of the DT binding for this field has
> been made conditional on this happening.
>
> Signed-off-by: Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>
> ---
>  drivers/extcon/extcon-arizona.c   |   14 +++++++++++---
>  include/linux/mfd/arizona/pdata.h |    3 +++
>  2 files changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
> index 9262b45..1fbe3b4 100644
> --- a/drivers/extcon/extcon-arizona.c
> +++ b/drivers/extcon/extcon-arizona.c
> @@ -1267,11 +1267,19 @@ static int arizona_extcon_probe(struct platform_device *pdev)
>                                    arizona->pdata.micd_rate
>                                    << ARIZONA_MICD_RATE_SHIFT);
>
> -       if (arizona->pdata.micd_dbtime)
> +       switch (arizona->pdata.micd_dbtime) {
> +       case ARIZONA_MICD_DBTIME_FOUR_READINGS:
>                 regmap_update_bits(arizona->regmap, ARIZONA_MIC_DETECT_1,
>                                    ARIZONA_MICD_DBTIME_MASK,
> -                                  arizona->pdata.micd_dbtime
> -                                  << ARIZONA_MICD_DBTIME_SHIFT);
> +                                  ARIZONA_MICD_DBTIME);
> +               break;
> +       case ARIZONA_MICD_DBTIME_TWO_READINGS:
> +               regmap_update_bits(arizona->regmap, ARIZONA_MIC_DETECT_1,
> +                                  ARIZONA_MICD_DBTIME_MASK, 0);
> +               break;
> +       default:
> +               break;
> +       }
>
>         BUILD_BUG_ON(ARRAY_SIZE(arizona_micd_levels) != 0x40);
>
> diff --git a/include/linux/mfd/arizona/pdata.h b/include/linux/mfd/arizona/pdata.h
> index aa5c48b..bd68355 100644
> --- a/include/linux/mfd/arizona/pdata.h
> +++ b/include/linux/mfd/arizona/pdata.h
> @@ -53,6 +53,9 @@
>
>  #define ARIZONA_MAX_PDM_SPK 2
>
> +#define ARIZONA_MICD_DBTIME_TWO_READINGS 2
> +#define ARIZONA_MICD_DBTIME_FOUR_READINGS 4
> +
>  struct regulator_init_data;
>
>  struct arizona_micbias {
> --
> 1.7.2.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ