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: <20201202130609.GM4801@dell>
Date:   Wed, 2 Dec 2020 13:06:09 +0000
From:   Lee Jones <lee.jones@...aro.org>
To:     Jonathan Neuschäfer <j.neuschaefer@....net>
Cc:     linux-kernel@...r.kernel.org, Rob Herring <robh+dt@...nel.org>,
        Thierry Reding <thierry.reding@...il.com>,
        Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>,
        Alessandro Zummo <a.zummo@...ertech.it>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        NXP Linux Team <linux-imx@....com>,
        Sam Ravnborg <sam@...nborg.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Heiko Stuebner <heiko.stuebner@...obroma-systems.com>,
        Stephan Gerhold <stephan@...hold.net>,
        Lubomir Rintel <lkundrak@...sk>,
        Mark Brown <broonie@...nel.org>, allen <allen.chen@....com.tw>,
        Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        devicetree@...r.kernel.org, linux-pwm@...r.kernel.org,
        linux-rtc@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        Heiko Stuebner <heiko@...ech.de>,
        Josua Mayer <josua.mayer@....eu>,
        Andreas Kemnade <andreas@...nade.info>,
        Arnd Bergmann <arnd@...db.de>, Daniel Palmer <daniel@...f.com>,
        Andy Shevchenko <andy.shevchenko@...il.com>
Subject: Re: [PATCH v4 3/7] mfd: Add base driver for Netronix embedded
 controller

On Wed, 02 Dec 2020, Lee Jones wrote:

> On Sun, 22 Nov 2020, Jonathan Neuschäfer wrote:
> 
> > The Netronix embedded controller is a microcontroller found in some
> > e-book readers designed by the original design manufacturer Netronix,
> > Inc. It contains RTC, battery monitoring, system power management, and
> > PWM functionality.
> > 
> > This driver implements register access and version detection.
> > 
> > Third-party hardware documentation is available at:
> > 
> >   https://github.com/neuschaefer/linux/wiki/Netronix-MSP430-embedded-controller
> > 
> > The EC supports interrupts, but the driver doesn't make use of them so
> > far.
> > 
> > Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@....net>
> > ---
> > 
> > v4:
> > - include asm/unaligned.h after linux/*
> > - Use put_unaligned_be16 instead of open-coded big-endian packing
> > - Clarify that 0x90=0xff00 causes an error in downstream kernel too
> > - Add commas after non-sentinel positions
> > - ntxec.h: declare structs device and regmap
> > - Replace WARN_ON usage and add comments to explain errors
> > - Replace dev_alert with dev_warn when the result isn't handled
> > - Change subdevice registration error message to dev_err
> > - Declare ntxec_reg8 as returning __be16
> > - Restructure version detection code
> > - Spell out ODM
> > 
> > v3:
> > - https://lore.kernel.org/lkml/20200924192455.2484005-4-j.neuschaefer@gmx.net/
> > - Add (EC) to CONFIG_MFD_NTXEC prompt
> > - Relicense as GPLv2 or later
> > - Add email address to copyright line
> > - remove empty lines in ntxec_poweroff and ntxec_restart functions
> > - Split long lines
> > - Remove 'Install ... handler' comments
> > - Make naming of struct i2c_client parameter consistent
> > - Remove struct ntxec_info
> > - Rework 'depends on' lines in Kconfig, hard-depend on I2C, select REGMAP_I2C and
> >   MFD_CORE
> > - Register subdevices via mfd_cells
> > - Move 8-bit register conversion to ntxec.h
> > 
> > v2:
> > - https://lore.kernel.org/lkml/20200905133230.1014581-4-j.neuschaefer@gmx.net/
> > - Add a description of the device to the patch text
> > - Unify spelling as 'Netronix embedded controller'.
> >   'Netronix' is the proper name of the manufacturer, but 'embedded controller'
> >   is just a label that I have assigned to the device.
> > - Switch to regmap, avoid regmap use in poweroff and reboot handlers.
> >   Inspired by cf84dc0bb40f4 ("mfd: rn5t618: Make restart handler atomic safe")
> > - Use a list of known-working firmware versions instead of checking for a
> >   known-incompatible version
> > - Prefix registers with NTXEC_REG_
> > - Define register values as constants
> > - Various style cleanups as suggested by Lee Jones
> > - Don't align = signs in struct initializers [Uwe Kleine-König]
> > - Don't use dev_dbg for an error message
> > - Explain sleep in poweroff handler
> > - Remove (struct ntxec).client
> > - Switch to .probe_new in i2c driver
> > - Add .remove callback
> > - Make CONFIG_MFD_NTXEC a tristate option
> > ---
> >  drivers/mfd/Kconfig       |  11 ++
> >  drivers/mfd/Makefile      |   1 +
> >  drivers/mfd/ntxec.c       | 216 ++++++++++++++++++++++++++++++++++++++
> >  include/linux/mfd/ntxec.h |  34 ++++++
> >  4 files changed, 262 insertions(+)
> >  create mode 100644 drivers/mfd/ntxec.c
> >  create mode 100644 include/linux/mfd/ntxec.h

[...]

> > +	/* Bail out if we encounter an unknown firmware version */
> > +	switch (version) {
> > +	case 0xd726: /* found in Kobo Aura */
> 
> No magic numbers.
> 
> Please submit a subsequent patch to define this.
> 
> > +		break;
> > +	default:
> > +		dev_err(ec->dev,
> > +			"Netronix embedded controller version %04x is not supported.\n",
> > +			version);
> > +		return -ENODEV;
> > +	}
> 
> Applied, thanks.

Sorry, that should have been:

For my own reference (apply this as-is to your sign-off block):

  Acked-for-MFD-by: Lee Jones <lee.jones@...aro.org>

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ