From: "Jiawen Wu" <jiawenwu@trustnetic.com>
To: "'Jarkko Nikula'" <jarkko.nikula@linux.intel.com>
Cc: <linux-i2c@vger.kernel.org>, <linux-gpio@vger.kernel.org>,
<olteanv@gmail.com>, <mengyuanlou@net-swift.com>,
<netdev@vger.kernel.org>, <linux@armlinux.org.uk>
Subject: RE: [PATCH net-next v3 2/8] i2c: designware: Add driver support for Wangxun 10Gb NIC
Date: Thu, 20 Apr 2023 18:49:43 +0800 [thread overview]
Message-ID: <03f001d97375$d0d1ab70$72750250$@trustnetic.com> (raw)
In-Reply-To: <fd5652bd-5b85-0f7d-3690-21eb1a0010b3@linux.intel.com>
> > --- a/drivers/i2c/busses/i2c-designware-platdrv.c
> > +++ b/drivers/i2c/busses/i2c-designware-platdrv.c
>
> > +static void dw_i2c_get_plat_data(struct dw_i2c_dev *dev)
> > +{
> > + struct platform_device *pdev = to_platform_device(dev->dev);
> > + struct dw_i2c_platform_data *pdata;
> > +
> > + pdata = dev_get_platdata(&pdev->dev);
> > + if (!pdata)
> > + return;
> > +
> > + dev->flags |= pdata->flags;
> > + dev->base = pdata->base;
> > +
> > + if (pdata->ss_hcnt && pdata->ss_lcnt) {
> > + dev->ss_hcnt = pdata->ss_hcnt;
> > + dev->ss_lcnt = pdata->ss_lcnt;
> > + } else {
> > + dev->ss_hcnt = 6;
> > + dev->ss_lcnt = 8;
> > + }
> > +
> > + if (pdata->fs_hcnt && pdata->fs_lcnt) {
> > + dev->fs_hcnt = pdata->fs_hcnt;
> > + dev->fs_lcnt = pdata->fs_lcnt;
> > + } else {
> > + dev->fs_hcnt = 6;
> > + dev->fs_lcnt = 8;
> > + }
> > +}
> > +
> > static const struct dmi_system_id dw_i2c_hwmon_class_dmi[] = {
> > {
> > .ident = "Qtechnology QT5222",
> > @@ -282,6 +314,8 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
> > dev->irq = irq;
> > platform_set_drvdata(pdev, dev);
> >
> > + dw_i2c_get_plat_data(dev);
> > +
> Instead of this added code would it be possible to use generic timing
> parameters which can come either from firmware or code? Those are
> handled already here by the call to i2c_parse_fw_timings().
>
> Then drivers/i2c/busses/i2c-designware-master.c:
> i2c_dw_set_timings_master() takes care of calculating Designware
> specific hcnt/lcnt timing parameters from those generic values.
>
I am confused about why fs_hcnt/fs_lcnt must be set when I use the
standard mode?
next prev parent reply other threads:[~2023-04-20 10:54 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-19 8:27 [PATCH net-next v3 0/8] TXGBE PHYLINK support Jiawen Wu
2023-04-19 8:27 ` [PATCH net-next v3 1/8] net: txgbe: Add software nodes to support phylink Jiawen Wu
2023-04-19 20:53 ` Andrew Lunn
2023-04-19 8:27 ` [PATCH net-next v3 2/8] i2c: designware: Add driver support for Wangxun 10Gb NIC Jiawen Wu
2023-04-19 14:36 ` Jarkko Nikula
2023-04-20 10:49 ` Jiawen Wu [this message]
2023-04-19 20:58 ` Andrew Lunn
2023-04-20 10:29 ` Jiawen Wu
2023-04-20 13:22 ` Andrew Lunn
2023-04-21 2:20 ` Jiawen Wu
2023-04-21 12:15 ` Andrew Lunn
2023-04-21 6:52 ` Jarkko Nikula
2023-04-21 12:22 ` Andrew Lunn
2023-04-21 13:00 ` Jarkko Nikula
2023-04-19 8:27 ` [PATCH net-next v3 3/8] net: txgbe: Register I2C platform device Jiawen Wu
2023-04-19 8:27 ` [PATCH net-next v3 4/8] net: txgbe: Add SFP module identify Jiawen Wu
2023-04-19 13:55 ` Vladimir Oltean
2023-04-19 8:27 ` [PATCH net-next v3 5/8] net: txgbe: Support GPIO to SFP socket Jiawen Wu
2023-04-19 8:27 ` [PATCH net-next v3 6/8] net: pcs: Add 10GBASE-R mode for Synopsys Designware XPCS Jiawen Wu
2023-04-19 13:19 ` Vladimir Oltean
2023-04-20 1:56 ` Jiawen Wu
2023-04-20 8:03 ` Vladimir Oltean
2023-04-20 8:38 ` Jiawen Wu
2023-04-20 8:52 ` Vladimir Oltean
2023-04-20 9:32 ` Jiawen Wu
2023-04-19 8:27 ` [PATCH net-next v3 7/8] net: txgbe: Implement phylink pcs Jiawen Wu
2023-04-19 8:27 ` [PATCH net-next v3 8/8] net: txgbe: Support phylink MAC layer Jiawen Wu
2023-04-19 13:39 ` [PATCH net-next v3 0/8] TXGBE PHYLINK support Vladimir Oltean
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='03f001d97375$d0d1ab70$72750250$@trustnetic.com' \
--to=jiawenwu@trustnetic.com \
--cc=jarkko.nikula@linux.intel.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;
as well as URLs for NNTP newsgroup(s).