All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: masonccyang@mxic.com.tw
Cc: bbrezillon@kernel.org, broonie@kernel.org,
	devicetree@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Simon Horman <horms@verge.net.au>,
	juliensu@mxic.com.tw, lee.jones@linaro.org,
	linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-spi@vger.kernel.org, marek.vasut@gmail.com,
	mark.rutland@arm.com, robh+dt@kernel.org
Subject: Re: [PATCH v10 1/3] mfd: Add Renesas R-Car Gen3 RPC-IF MFD controller driver
Date: Tue, 16 Apr 2019 21:57:30 +0300	[thread overview]
Message-ID: <770002ab-7e08-b695-b5a5-fce772b600a5@cogentembedded.com> (raw)
In-Reply-To: <OF8A9D093C.B3035121-ON482583DE.00065F23-482583DE.00074AC0@mxic.com.tw>

On 04/16/2019 04:19 AM, masonccyang@mxic.com.tw wrote:

>> Re: [PATCH v10 1/3] mfd: Add Renesas R-Car Gen3 RPC-IF MFD controller driver
>>
>> The patch name is somewhat misleading -- there's no "MFD controller".
> 
> Can't get your point ?
> 
> RPC-IF support SPI and HF, it's a MFD controller and
> that's why I patch it to MFD as Marek's comments.

   I'd like the "controller" word dropped, as MFD stands for multi-function device
anyway. "Controller" seems to be superfluous here...

>> On 04/15/2019 10:37 AM, Mason Yang wrote:
>>
>> > Add a driver for Renesas R-Car Gen3 RPC-IF MFD controller.
>> >
>> > Signed-off-by: Mason Yang <masonccyang@mxic.com.tw>
>> [...]
>> > diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
>> > index 26ad646..7914349 100644
>> > --- a/drivers/mfd/Kconfig
>> > +++ b/drivers/mfd/Kconfig
>> > @@ -978,6 +978,15 @@ config MFD_RDC321X
>> >       southbridge which provides access to GPIOs and Watchdog using the
>> >       southbridge PCI device configuration space.
>> >  
>> > +config MFD_RENESAS_RPC
>> > +   tristate "Renesas R-Car Gen3 RPC-IF MFD driver"
>> > +   select MFD_CORE
>> > +   depends on ARCH_RENESAS
>> > +   help
>> > +     This supports for Renesas R-Car Gen3 RPC-IF multifunction device
>>
>>    "For" node needed here.
> 
> ?

   Sorry, that was a typo: s/node/not/.

>> [...]
>> > diff --git a/include/linux/mfd/renesas-rpc.h b/include/linux/mfd/
>> renesas-rpc.h
>> > new file mode 100644
>> > index 0000000..61ada14
>> > --- /dev/null
>> > +++ b/include/linux/mfd/renesas-rpc.h
>> > @@ -0,0 +1,153 @@
>> > +// SPDX-License-Identifier: GPL-2.0
>> > +//
>> > +// Copyright (C) 2018 ~ 2019 Renesas Solutions Corp.
>> > +// Copyright (C) 2019 Macronix International Co., Ltd.
>> > +//
>> > +// R-Car Gen3 RPC-IF MFD driver
>> > +//
>> > +// Author:
>> > +//   Mason Yang <masonccyang@mxic.com.tw>
>> > +//
>> > +
>> > +#ifndef __MFD_RENESAS_RPC_H
>> > +#define __MFD_RENESAS_RPC_H
>> > +
>> > +#include <linux/clk.h>
>> > +#include <linux/io.h>
>> > +#include <linux/log2.h>
>> > +#include <linux/iopoll.h>
>> > +#include <linux/module.h>
>> > +#include <linux/mtd/mtd.h>
>> > +#include <linux/platform_device.h>
>> > +#include <linux/pm_runtime.h>
>> > +#include <linux/of.h>
>> > +#include <linux/regmap.h>
>> > +#include <linux/reset.h>
>>
>>    NAK. I have already told you that these #include's are only needed in the
>> drivers, not in this header.
> 
> why ?

   Why what? As a rule of thumb, we #include only headers necessary to build
the file in question.

> I think these #include files are still needed in HyperFlash driver.

   Hopefully not. Though that doesn't really matter much.

> i.e,. clk controller, mtd and so on.
> 
>>
>>    My idea is to contain all hardware manipulation in the MFD driver,
>> with SPI/HF drivers calling that code via a set of APIs declared in
>> this header.
>> The registers (declared below) would end up only needed by that
>> common MFD driver...
> 
> best regards,
> Mason

MBR, Sergei

  reply	other threads:[~2019-04-16 18:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15  7:37 [PATCH v10 0/3] mfd: Add Renesas R-Car Gen3 RPC-IF MFD & SPI driver Mason Yang
2019-04-15  7:37 ` [PATCH v10 1/3] mfd: Add Renesas R-Car Gen3 RPC-IF MFD controller driver Mason Yang
2019-04-15 19:57   ` Sergei Shtylyov
2019-04-16  1:19     ` masonccyang
2019-04-16 18:57       ` Sergei Shtylyov [this message]
2019-04-17  6:21         ` masonccyang
2019-04-17 20:26           ` Sergei Shtylyov
2019-04-15  7:37 ` [PATCH v10 2/3] spi: Add Renesas R-Car Gen3 RPC-IF SPI " Mason Yang
2019-04-16 18:37   ` Sergei Shtylyov
2019-04-15  7:37 ` [PATCH v10 3/3] dt-bindings: mfd: Document Renesas R-Car Gen3 RPC-IF controller bindings Mason Yang
2019-04-15 16:49   ` Sergei Shtylyov
2019-04-16  1:06     ` masonccyang
2019-04-16  8:02       ` Sergei Shtylyov
2019-04-18  5:55         ` masonccyang
2019-04-18 16:55           ` Sergei Shtylyov
2019-04-19  5:50             ` masonccyang
2019-04-19 15:44             ` Sergei Shtylyov

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=770002ab-7e08-b695-b5a5-fce772b600a5@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=bbrezillon@kernel.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=horms@verge.net.au \
    --cc=juliensu@mxic.com.tw \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=marek.vasut@gmail.com \
    --cc=mark.rutland@arm.com \
    --cc=masonccyang@mxic.com.tw \
    --cc=robh+dt@kernel.org \
    /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.