All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: "Tanwar, Rahul" <rahul.tanwar@linux.intel.com>
Cc: "Andy Shevchenko" <andriy.shevchenko@intel.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	linux-pwm@vger.kernel.org, "Lee Jones" <lee.jones@linaro.org>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	devicetree <devicetree@vger.kernel.org>,
	songjun.Wu@intel.com, cheol.yong.kim@intel.com,
	qi-ming.wu@intel.com, rahul.tanwar.linux@gmail.com,
	rtanwar@maxlinear.com
Subject: Re: [PATCH v9 2/2] Add PWM fan controller driver for LGM SoC
Date: Sat, 22 Aug 2020 12:23:12 +0300	[thread overview]
Message-ID: <CAHp75Vc1=_SeYHtQvXrV+G-b5t4vWS6ga3s_Zmez7rQPORWr7w@mail.gmail.com> (raw)
In-Reply-To: <d8c85de1-dacf-e8eb-6e49-131d007f3a6b@linux.intel.com>

On Sat, Aug 22, 2020 at 8:25 AM Tanwar, Rahul
<rahul.tanwar@linux.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

      reply	other threads:[~2020-08-22  9:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-21  9:32 [PATCH v9 0/2] pwm: intel: Add PWM driver for a new SoC Rahul Tanwar
2020-08-21  9:32 ` [PATCH v9 1/2] Add DT bindings YAML schema for PWM fan controller of LGM SoC Rahul Tanwar
2020-08-21  9:32 ` [PATCH v9 2/2] Add PWM fan controller driver for " Rahul Tanwar
2020-08-21 10:56   ` Andy Shevchenko
2020-08-22  5:21     ` Tanwar, Rahul
2020-08-22  9:23       ` Andy Shevchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHp75Vc1=_SeYHtQvXrV+G-b5t4vWS6ga3s_Zmez7rQPORWr7w@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=cheol.yong.kim@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=qi-ming.wu@intel.com \
    --cc=rahul.tanwar.linux@gmail.com \
    --cc=rahul.tanwar@linux.intel.com \
    --cc=robh+dt@kernel.org \
    --cc=rtanwar@maxlinear.com \
    --cc=songjun.Wu@intel.com \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.