From: Wolfram Sang <wsa@kernel.org>
To: Hans Hu <hanshu-oc@zhaoxin.com>
Cc: andi.shyti@kernel.org, krzk@kernel.org, TonyWWang@zhaoxin.com,
cobechen@zhaoxin.com, linux-i2c@vger.kernel.org
Subject: Re: [PATCH v6] i2c: add support for Zhaoxin I2C controller
Date: Fri, 23 Jun 2023 10:47:48 +0200 [thread overview]
Message-ID: <ZJVcNIDWEbB6Jq7a@shikoro> (raw)
In-Reply-To: <20230614094858.317652-1-hanshu-oc@zhaoxin.com>
[-- Attachment #1: Type: text/plain, Size: 1325 bytes --]
Hi,
thank you for submitting this driver!
> diff --git a/drivers/i2c/busses/i2c-zhaoxin.c b/drivers/i2c/busses/i2c-zhaoxin.c
> new file mode 100644
> index 000000000000..bd5432bec7be
> --- /dev/null
> +++ b/drivers/i2c/busses/i2c-zhaoxin.c
> @@ -0,0 +1,599 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/*
> + * i2c-zhaoxin-i2c.c - Zhaoxin I2C controller driver
This doesn't match the real file name anymore. I suggest to leave out
the filename completely.
> + *
> + * Copyright(c) 2023 Shanghai Zhaoxin Semiconductor Corporation.
> + * All rights reserved.
> + */
> +
> +#include <linux/delay.h>
> +#include <linux/i2c.h>
> +#include <linux/pci.h>
> +#include <linux/platform_device.h>
Some includes are missing here. For example, module.h as you are using
some of its functionality directly. Probably some more includes are
needed.
> + * registers
> + */
> +/* I2C MMIO Address Constants */
> +#define ZXI2C_CR_L 0x00
> +#define ZXI2C_CPU_RDY BIT(3)
> +#define ZXI2C_TX_END BIT(2)
> +#define ZXI2C_RX_ACK BIT(1)
The register layout looks similar to the i2c-wmt driver. Could this
driver maybe be reused for your hardware? I'll stop reviewing here
because we need to have that clear first.
Thank you and happy hacking,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-06-23 8:47 UTC|newest]
Thread overview: 14+ 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
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 [this message]
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
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=ZJVcNIDWEbB6Jq7a@shikoro \
--to=wsa@kernel.org \
--cc=TonyWWang@zhaoxin.com \
--cc=andi.shyti@kernel.org \
--cc=cobechen@zhaoxin.com \
--cc=hanshu-oc@zhaoxin.com \
--cc=krzk@kernel.org \
--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