Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1496750

Re: [PATCH V1 04/10] watchdog: da9061: watchdog driver (RFC)

From Steve Twiss <stwiss.opensource@diasemi.com>
Newsgroups linux.kernel
Subject Re: [PATCH V1 04/10] watchdog: da9061: watchdog driver (RFC)
Date 2016-10-06 18:30 +0200
Message-ID <spjIt-2Ov-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Guenter,

Thanks for your reply.

On 06 October 2016 14:28, Guenter Roeck, wrote:

> To: Steve Twiss; LINUX-KERNEL; LINUX-WATCHDOG; Wim Van Sebroeck
> Subject: Re: [PATCH V1 04/10] watchdog: da9061: watchdog driver

[...]

> > @@ -180,6 +180,11 @@ static const struct watchdog_info da9062_watchdog_info = {
> >  	.identity = "DA9062 WDT",
> >  };
> >
> > +static const struct watchdog_info da9061_watchdog_info = {
> > +	.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
> > +	.identity = "DA9061 WDT",
> 
> This adds a lot of complexity to the driver just to be able to display "DA9061".
> Why not just change the existing identity to "DA9061/DA9062 WDT" ?

This is true.
I am using the compatible string to pick a different configuration .data block:

{ .compatible = "dlg,da9062-watchdog", .data = &da9062_watchdog_info },
{ .compatible = "dlg,da9061-watchdog", .data = &da9061_watchdog_info },

when the only real difference between the DA9061 and DA9062 watchdog driver
is the name. Functionally they are identical in this case.
This was a similar comment in Dialog's internal review on this exact same point.
"Why not just report one thing?"

My answer to that was because it would allow to distinguish between different chips.
The watchdog driver would report the correct chip type, despite the driver always
being for DA9062.

This exact same thing would happen with da9063-onkey and da9062-thermal also.
For the ONKEY it is marginally confused by needing to support 63, but for 62 and 61
it is the same thing. Only the name is different.

I have TO:'d Dmitry Torokhov; Eduardo Valentin; Zhang Rui, for that reason.

But, it is just my opinion to keep the "name" different.
This will not be my decision if accepted into the Linux kernel, but I would like to 
at least be consistent for DA9061 and DA9062 so ... is this an issue?

The same question applies to thermal and onkey as well.

Regards,
Steve

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH V1 04/10] watchdog: da9061: watchdog driver (RFC) Steve Twiss <stwiss.opensource@diasemi.com> - 2016-10-06 18:30 +0200
  Re: [PATCH V1 04/10] watchdog: da9061: watchdog driver (RFC) Guenter Roeck <linux@roeck-us.net> - 2016-10-06 20:50 +0200
    RE: [PATCH V1 04/10] watchdog: da9061: watchdog driver (RFC) Steve Twiss <stwiss.opensource@diasemi.com> - 2016-10-07 17:00 +0200
      Re: [PATCH V1 04/10] watchdog: da9061: watchdog driver (RFC) Guenter Roeck <linux@roeck-us.net> - 2016-10-07 20:10 +0200
        RE: [PATCH V1 04/10] watchdog: da9061: watchdog driver (RFC) Steve Twiss <stwiss.opensource@diasemi.com> - 2016-10-07 20:10 +0200
          Re: [PATCH V1 04/10] watchdog: da9061: watchdog driver (RFC) Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-10-08 01:40 +0200
            Re: [PATCH V1 04/10] watchdog: da9061: watchdog driver (RFC) Guenter Roeck <linux@roeck-us.net> - 2016-10-08 02:30 +0200
              RE: [PATCH V1 04/10] watchdog: da9061: watchdog driver (RFC) Steve Twiss <stwiss.opensource@diasemi.com> - 2016-10-08 08:40 +0200

csiph-web