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]
Date:	Thu, 15 Oct 2015 09:37:19 +1100
From:	Julian Calaby <julian.calaby@...il.com>
To:	Chen-Yu Tsai <wens@...e.org>
Cc:	Maxime Ripard <maxime.ripard@...e-electrons.com>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Lee Jones <lee.jones@...aro.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>,
	Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Hans de Goede <hdegoede@...hat.com>,
	"Mailing List, Arm" <linux-arm-kernel@...ts.infradead.org>,
	devicetree <devicetree@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-sunxi <linux-sunxi@...glegroups.com>
Subject: Re: [linux-sunxi] [PATCH 2/6] mfd: axp20x: Split the driver into core
 and i2c bits

Hi Chen-Yu,

On Thu, Oct 15, 2015 at 3:32 AM, Chen-Yu Tsai <wens@...e.org> wrote:
> The axp20x driver assumes the device is i2c based. This is not the
> case with later models, which use a proprietary 2 wire serial bus
> called "Reduced Serial Bus".
>
> This patch follows the example of mfd/wm831x and splits it into
> an interface independet core, and an i2c specific glue layer.
>
> The old MFD_AXP20X Kconfig symbol is kept until sub-device drivers
> and defconfigs have migrated to the new MFD_AXP20X_CORE symbol.
>
> Included but unused header files are removed as well.
>
> Signed-off-by: Chen-Yu Tsai <wens@...e.org>
> ---
>  drivers/mfd/Kconfig                     |  18 ++++-
>  drivers/mfd/Makefile                    |   3 +-
>  drivers/mfd/{axp20x.c => axp20x-core.c} | 105 +++-----------------------
>  drivers/mfd/axp20x-i2c.c                | 127 ++++++++++++++++++++++++++++++++
>  include/linux/mfd/axp20x.h              |  33 ++++++++-
>  5 files changed, 186 insertions(+), 100 deletions(-)
>  rename drivers/mfd/{axp20x.c => axp20x-core.c} (87%)
>  create mode 100644 drivers/mfd/axp20x-i2c.c
>
> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index 99d63675f073..9ba3feb3f2fc 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -79,15 +79,25 @@ config MFD_BCM590XX
>         help
>           Support for the BCM590xx PMUs from Broadcom
>
> +# Keep the old symbol until subdevice driver dependencies and defconfigs
> +# have been updated.
>  config MFD_AXP20X
> -       bool "X-Powers AXP20X"
> +       bool "X-Powers AXP series PMICs"
> +       select MFD_AXP20X_I2C

Unless something has changed in KConfig, (and my knowledge on this is
likely to be outdated) I don't believe this will work as I don't think
selects don't get propagated like you expect. Have you checked that
all possible configuration options survive make oldconfig and build
without warnings?

Also, unless there's some compelling reason not to, it's probably a
good idea to update the dependent drivers and defconfigs now. (or make
this change in a gentler manner.)

> +
> +config MFD_AXP20X_CORE
> +       bool
>         select MFD_CORE
> -       select REGMAP_I2C
>         select REGMAP_IRQ
> +
> +config MFD_AXP20X_I2C
> +       bool "X-Powers AXP series I2C PMICs"
> +       select MFD_AXP20X_CORE
> +       select REGMAP_I2C
>         depends on I2C=y
>         help
> -         If you say Y here you get support for the X-Powers AXP202, AXP209 and
> -         AXP288 power management IC (PMIC).
> +         If you say Y here you get support for the X-Powers AXP series I2C
> +         based power management ICs (PMICs).
>           This driver include only the core APIs. You have to select individual
>           components like regulators or the PEK (Power Enable Key) under the
>           corresponding menus.

Thanks,

-- 
Julian Calaby

Email: julian.calaby@...il.com
Profile: http://www.google.com/profiles/julian.calaby/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ