RE: [PATCH 2/6] mfd: da9062: make register CONFIG_I writable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Lee,

On 24 October 2017 11:25, Lee Jones wrote:

> Subject: Re: [PATCH 2/6] mfd: da9062: make register CONFIG_I writable
> 
> On Tue, 17 Oct 2017, Michael Grzeschik wrote:
> > From: Stefan Christ <s.christ@xxxxxxxxx>
> >
> > Make the config register CONFIG_I writable to change the watchdog mode.
> > The datasheet does not mention exactly whether these registers should be
> > read-only or writeable. But writing to those registers works at runtime.
> > Only on reset they are reseted.
> >
> > Signed-off-by: Stefan Christ <s.christ@xxxxxxxxx>
> > Signed-off-by: Christian Hemp <c.hemp@xxxxxxxxx>
> > ---
> >  drivers/mfd/da9062-core.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> 
> For my own reference:
>   Acked-for-MFD-by: Lee Jones <lee.jones@xxxxxxxxxx>

Setting CONFIG_I to be writable (and allowing WATCHDOG_SD bit changes to that register)
is probably not a great idea. On the face of it, the change is fairly innocuous but it will
allow the PMIC's behaviour to be modified during kernel run-time.

That change can be done, but making it a permanent change in the general Linux kernel driver
would indicate it is okay to change the CONFIG_I registers during normal run-time operation,
and generally I do not think this is okay.

- [PATCH 3/6] watchdog: da9062: reset board on watchdog timeout
  https://www.spinics.net/lists/linux-watchdog/msg12680.html

I suggested if CONFIG_I is to be altered, then this register could be modified before the
Linux kernel driver has started, e.g. early in the bootloader; or the change chould be done
in hardware by writing the persistent OTP in the device. If necessary, the Linux kernel driver
can read the CONFIG_I register and modify its behaviour accordingly. In both cases, a write
access change to CONFIG_I would not be needed.

Regards,
Steve
��.n��������+%������w��{.n�����{���rh���ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux