From: Krzysztof Kozlowski <krzk@kernel.org>
To: Hans Hu <hanshu-oc@zhaoxin.com>,
andi.shyti@kernel.org, linux-i2c@vger.kernel.org
Cc: cobechen@zhaoxin.com, TonyWWang@zhaoxin.com
Subject: Re: [PATCH v4] i2c: add support for Zhaoxin I2C controller
Date: Fri, 9 Jun 2023 11:33:54 +0200 [thread overview]
Message-ID: <a6c22dd5-262c-4829-1eda-601cff697553@kernel.org> (raw)
In-Reply-To: <20230609031625.6928-1-hanshu-oc@zhaoxin.com>
On 09/06/2023 05:16, Hans Hu wrote:
> Add Zhaoxin I2C controller driver. It provides the access to the i2c
> busses, which connects to the touchpad, eeprom, etc.
>
> Zhaoxin I2C controller has two separate busses, so may accommodate up
> to two I2C adapters. Those adapters are listed in the ACPI namespace
> with the "IIC1D17" HID, and probed by a platform driver.
>
> The driver works with IRQ mode, and supports basic I2C features. Flags
> I2C_AQ_NO_ZERO_LEN and I2C_AQ_COMB_WRITE_THEN_READ are used to limit
> the unsupported access.
>
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index cb932c6f8959..bb61e19eef72 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -9761,6 +9761,13 @@ L: linux-i2c@vger.kernel.org
> F: Documentation/i2c/busses/i2c-ismt.rst
> F: drivers/i2c/busses/i2c-ismt.c
>
> +ZHAOXIN I2C CONTROLLER DRIVER
> +M: Hans Hu <hanshu@zhaoxin.com>
> +L: linux-i2c@vger.kernel.org
> +S: Maintained
> +W: https://www.zhaoxin.com
> +F: drivers/i2c/busses/i2c-zhaoxin.c
> +
> I2C/SMBUS STUB DRIVER
> M: Jean Delvare <jdelvare@suse.com>
> L: linux-i2c@vger.kernel.org
> diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
> index 87600b4aacb3..1f181757ce2a 100644
> --- a/drivers/i2c/busses/Kconfig
> +++ b/drivers/i2c/busses/Kconfig
> @@ -333,6 +333,16 @@ config I2C_VIAPRO
> This driver can also be built as a module. If so, the module
> will be called i2c-viapro.
>
> +config I2C_ZHAOXIN
> + tristate "ZHAOXIN I2C Interface"
> + depends on (PCI && ACPI) || COMPILE_TEST
> + help
> + If you say yes to this option, support will be included for the
> + ZHAOXIN I2C interface
> +
> + This driver can also be built as a module. If so, the module
> + will be called i2c-zhaoxin.
> +
> if ACPI
>
> comment "ACPI drivers"
Shouldn't you driver be in ACPI drivers?
...
> +
> +static int zxi2c_probe(struct platform_device *pdev)
> +{
> + int err = 0;
> + struct zxi2c *i2c;
> + struct pci_dev *pci;
> + struct device *dev;
> +
> + /* make sure this is zhaoxin platform */
Why? You didn't provid explanation last time for this.
> + dev = pdev->dev.parent;
> + if (dev && dev_is_pci(dev)) {
> + pci = to_pci_dev(dev);
> + if (pci->vendor != PCI_VENDOR_ID_ZHAOXIN ||
> + pci->device != ZXI2C_PARENT_PCI_DID)
> + return -ENODEV;
> + } else {
> + return -ENODEV;
> + }
Drop it.
> +
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-06-09 9:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-09 3:16 [PATCH v4] i2c: add support for Zhaoxin I2C controller Hans Hu
2023-06-09 9:33 ` Krzysztof Kozlowski [this message]
2023-06-12 3:31 ` Hans Hu
2023-06-09 12:24 ` Andi Shyti
2023-06-09 13:11 ` Krzysztof Kozlowski
2023-06-12 8:24 ` Hans Hu
2023-06-09 12:47 ` Andi Shyti
2023-06-14 7:34 ` [PATCH v5] " Hans Hu
2023-06-14 8:21 ` Andi Shyti
2023-06-14 9:48 ` [PATCH v6] " Hans Hu
2023-06-23 8:47 ` Wolfram Sang
2023-06-25 10:57 ` Hans Hu
2023-06-30 8:01 ` Andi Shyti
[not found] ` <6f3479fb79944d5a8b4a562d67c82a4b@zhaoxin.com>
[not found] ` <1abb34e5cbe74514911598a5a522045b@zhaoxin.com>
2023-07-06 7:25 ` Hans Hu
-- strict thread matches above, loose matches on Subject: below --
2023-06-09 2:55 [PATCH v4] " Hans Hu
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=a6c22dd5-262c-4829-1eda-601cff697553@kernel.org \
--to=krzk@kernel.org \
--cc=TonyWWang@zhaoxin.com \
--cc=andi.shyti@kernel.org \
--cc=cobechen@zhaoxin.com \
--cc=hanshu-oc@zhaoxin.com \
--cc=linux-i2c@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox