public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Jiawen Wu <jiawenwu@trustnetic.com>
Cc: netdev@vger.kernel.org, andrew@lunn.ch, linux@armlinux.org.uk,
	jarkko.nikula@linux.intel.com, olteanv@gmail.com,
	hkallweit1@gmail.com, linux-i2c@vger.kernel.org,
	linux-gpio@vger.kernel.org, mengyuanlou@net-swift.com
Subject: Re: [PATCH net-next v4 2/8] i2c: designware: Add driver support for Wangxun 10Gb NIC
Date: Sat, 22 Apr 2023 19:25:57 +0300	[thread overview]
Message-ID: <ZEQKlSIIZi9941Bh@smile.fi.intel.com> (raw)
In-Reply-To: <20230422045621.360918-3-jiawenwu@trustnetic.com>

On Sat, Apr 22, 2023 at 12:56:15PM +0800, Jiawen Wu wrote:
> Wangxun 10Gb ethernet chip is connected to Designware I2C, to communicate
> with SFP.
> 
> Add platform data to pass IOMEM base address, board flag since resource
> address was mapped on ethernet driver. Since there is no device tree to
> get the clock, the parameters hcnt/lcnt are also set by platform data.
> 
> The exists IP limitations are dealt as workarounds:
> - IP does not support interrupt mode, it works on polling mode.
> - Additionally set FIFO depth address the chip issue.
> 
> Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>

Please, use --cc parameter to `git format-patch ...`.

Also for tag block we do not use blank lines.

...

>  #define MODEL_MSCC_OCELOT			BIT(8)
>  #define MODEL_BAIKAL_BT1			BIT(9)
>  #define MODEL_AMD_NAVI_GPU			BIT(10)
> +#define MODEL_WANGXUN_SP			BIT(11)
>  #define MODEL_MASK				GENMASK(11, 8)

Yeah, maybe next one will need to transform this from bitfield to plain number.

...

> -static int amd_i2c_adap_quirk(struct dw_i2c_dev *dev)
> +static int poll_i2c_adap_quirk(struct dw_i2c_dev *dev)

i2c_dw_poll_adap_quirk()

...

> +static bool i2c_is_model_poll(struct dw_i2c_dev *dev)

i2c_dw_is_...

...

> +++ b/include/linux/platform_data/i2c-dw.h

No way we need this in a new code.

> +struct dw_i2c_platform_data {
> +	void __iomem *base;

You should use regmap.

> +	unsigned int flags;
> +	unsigned int ss_hcnt;
> +	unsigned int ss_lcnt;
> +	unsigned int fs_hcnt;
> +	unsigned int fs_lcnt;

No, use device properties.

> +};

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2023-04-22 16:26 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-22  4:56 [PATCH net-next v4 0/8] TXGBE PHYLINK support Jiawen Wu
2023-04-22  4:56 ` [PATCH net-next v4 1/8] net: txgbe: Add software nodes to support phylink Jiawen Wu
2023-04-23 19:47   ` Simon Horman
2023-04-22  4:56 ` [PATCH net-next v4 2/8] i2c: designware: Add driver support for Wangxun 10Gb NIC Jiawen Wu
2023-04-22 16:25   ` Andy Shevchenko [this message]
2023-04-23  2:31     ` Jiawen Wu
2023-04-24 13:28       ` 'Andy Shevchenko'
2023-04-24  2:39     ` Jiawen Wu
2023-04-25 14:08     ` Andi Shyti
2023-05-01 18:28       ` Andy Shevchenko
2023-04-22  4:56 ` [PATCH net-next v4 3/8] net: txgbe: Register I2C platform device Jiawen Wu
2023-04-25 15:06   ` Andi Shyti
2023-04-25 15:16     ` Andi Shyti
2023-04-22  4:56 ` [PATCH net-next v4 4/8] net: txgbe: Add SFP module identify Jiawen Wu
2023-04-22  4:56 ` [PATCH net-next v4 5/8] net: txgbe: Support GPIO to SFP socket Jiawen Wu
2023-04-22  4:56 ` [PATCH net-next v4 6/8] net: pcs: Add 10GBASE-R mode for Synopsys Designware XPCS Jiawen Wu
2023-05-02  8:01   ` Russell King (Oracle)
2023-04-22  4:56 ` [PATCH net-next v4 7/8] net: txgbe: Implement phylink pcs Jiawen Wu
2023-04-22  4:56 ` [PATCH net-next v4 8/8] net: txgbe: Support phylink MAC layer Jiawen Wu
2023-04-23 19:57   ` Simon Horman
2023-04-24  1:49     ` Jiawen Wu

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=ZEQKlSIIZi9941Bh@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=andrew@lunn.ch \
    --cc=hkallweit1@gmail.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=jiawenwu@trustnetic.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mengyuanlou@net-swift.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox