[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75Vc1=_SeYHtQvXrV+G-b5t4vWS6ga3s_Zmez7rQPORWr7w@mail.gmail.com>
Date: Sat, 22 Aug 2020 12:23:12 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: "Tanwar, Rahul" <rahul.tanwar@...ux.intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@...el.com>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>, linux-pwm@...r.kernel.org,
Lee Jones <lee.jones@...aro.org>,
Thierry Reding <thierry.reding@...il.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
Rob Herring <robh+dt@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
devicetree <devicetree@...r.kernel.org>, songjun.Wu@...el.com,
cheol.yong.kim@...el.com, qi-ming.wu@...el.com,
rahul.tanwar.linux@...il.com, rtanwar@...linear.com
Subject: Re: [PATCH v9 2/2] Add PWM fan controller driver for LGM SoC
On Sat, Aug 22, 2020 at 8:25 AM Tanwar, Rahul
<rahul.tanwar@...ux.intel.com> wrote:
> On 21/8/2020 6:56 pm, Andy Shevchenko wrote:
> > On Fri, Aug 21, 2020 at 05:32:11PM +0800, Rahul Tanwar wrote:
...
> >> +#include <linux/bitfield.h>
> >> +#include <linux/clk.h>
> >> +#include <linux/module.h>
> >> +#include <linux/of_device.h>
> > We haven't settle this yet...
>
> I investigated more about it. I was getting build error because we were
> relying on of_device.h for including platform_device.h. You are right that
> we are not using anything from of_device.h. So i removed of_device.h from
> driver and added include <linux/platform_device.h> & build is ok.
>
> Regarding mod_devicetable.h header, it gets included indirectly from
> <linux/pwm.h> which includes of.h which includes mod_devicetable.h. So i
> think no point including it again in the driver.
Ideally you should include all headers you have direct users of.
mod_devicetable.h is exactly one and I doubt the pwm.h should include
it, but it's another story.
There are, of course, some cases when not all required because there
is a guarantee that upper one includes lower one. For example, if you
use bitops.h there is no need to include bits.h.
> >> +#include <linux/pwm.h>
> >> +#include <linux/regmap.h>
> >> +#include <linux/reset.h>
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists