Devicetree
 help / color / mirror / Atom feed
From: zychen <zychennvt@gmail.com>
To: Andi Shyti <andi.shyti@kernel.org>,
	linux-i2c@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Cc: Jacky Huang <ychuang3@nuvoton.com>,
	Shan-Chun Hung <schung@nuvoton.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Andrew Jeffery <andrew@codeconstruct.com.au>
Subject: Re: [PATCH v11 0/3] i2c: ma35d1: Add support for MA35D1 I2C controller
Date: Fri, 16 Oct 2026 10:40:39 +0800	[thread overview]
Message-ID: <17bf5ca0-c071-4ba8-b168-3ffbdae629ad@gmail.com> (raw)
In-Reply-To: <20261016010448.324856-1-zychennvt@gmail.com>

Hi all,

Sorry, the cover letter subject contains a typo: it should be [PATCH v12 0/3], not [PATCH v11 0/3].

The cover letter content and all three patches are from v12.

Sorry for the confusion.

Best regards,
Zi-Yu

Zi-Yu Chen 於 2026/10/16 上午 09:04 寫道:
> This series adds support for the I2C controller found in the Nuvoton
> MA35D1 SoC. The driver supports controller and optional target mode
> and runtime power management.
> 
> The implementation has been tested on the Nuvoton MA35D1 SOM board.
> 
> Signed-off-by: Zi-Yu Chen <zychennvt@gmail.com>
> ---
> Changes in v12:
> 	- Synchronize IRQs while initializing transfer state and issuing START.
> 	- Clear wake-up control if enabling IRQ wake fails.
> 	v11: https://lore.kernel.org/all/20261001075101.489660-1-zychennvt@gmail.com/
> 
> Changes in v11:
> 	According to Andi's comments:
> 	- Prefix the remaining timeout macros with `MA35_`.
> 	- Handle errors returned by `i2c_slave_event()` by sending NACK when the
> 		target driver rejects a request.
> 	- Use `dev_err_probe()` consistently in probe error paths.
> 	v10: https://lore.kernel.org/r/20260921083753.1109826-1-zychennvt@gmail.com/
> 
> Changes in v10:
> 	- Handle enable_irq_wake() return value in suspend.
> 	- Correct clock divider mask and maximum limit to 10-bit.
> 	v9: https://lore.kernel.org/r/20260807060400.2047517-1-zychennvt@gmail.com/
> 
> Changes in v9:
> 	- Centralize SI handling in the interrupt handler.
> 	- Fix target mode comments.
> 	- Initialize the target transmit byte.
> 	- Add reset_control_deassert() during probe.
> 	v8: https://lore.kernel.org/r/20260804084806.1846570-1-zychennvt@gmail.com/
> 
> Changes in v8:
> 	- Remove rpm_put avoid duplicate processing.
> 	- Add synchronize_irq wait for interrupt to finish before i2c->target = NULL.
> 	- Add ma35d1_i2c_restore_idle() to handle bus errors or spurious interrupts.
> 	- Change return types of TRX helper functions to irqreturn_t, returning
> 		IRQ_NONE for unhandled status codes.
> 	v7: https://lore.kernel.org/r/20260727081859.1737223-1-zychennvt@gmail.com/
> 
> Changes in v7:
> 	- Disable IRQ before clearing i2c->msg.
> 	- Support	CONFIG_PM=n, and simplify runtime PM setup accordingly.
> 	- Remove redundant register access in runtime suspend/resume callbacks.
> 	- Defer clearing i2c->target until after pm_runtime_put_sync() in ma35d1_unreg_target().
> 	- Enable interrupts alongside I2C enable in ma35d1_i2c_reset().
>   v6: https://lore.kernel.org/r/20260720030616.1067660-1-zychennvt@gmail.com/
> 
> Changes in v6:
>   - Patch 2 (driver):
> 		- Removed dynamic IRQ toggling helpers for simpler interrupt management.
> 		Based on Sashiko AI Feedback:
> 		- Added zero-length read quirk.
> 		- Set i2c->msg to NULL on timeout to avoid use-after-free.
> 		- Cleared hardware registers on target unregistration to release the bus.
> 		- Protected suspend-path register writes with a spinlock.
> 		- Validated clock-frequency to prevent division-by-zero.
> 		- Removed incorrect I2C_M_IGNORE_NAK handling.
> 		- Corrected a comment typo in the receive data path.		
>   - Patch 3 (dts):
>     - use a generic functional name audio-codec@1a
>   v5: https://lore.kernel.org/r/20260630012106.3616821-1-zychennvt@gmail.com/
> 
> Changes in v5:
>   - Patch 2 (driver):
>     - Add spinlock protection for MA35_CTL0 register access.
>     - Add NULL pointer check for i2c->msg in the ISR.
>     - Use devres-managed cleanup (devm_add_action_or_reset) for runtime PM.
>     - Use pm_runtime_force_suspend/resume() for Controller mode 
>       system sleep.
>     - Control I2CEN bit enabling/disabling via runtime PM.
>     - Refactor arbitration lost handling in state machines.
>     - Remove unsupported I2C_FUNC_PROTOCOL_MANGLING flag.
>     - Clean up readl_poll_timeout() parameters, retry loop, and
>       unused macros.
>   v4: https://lore.kernel.org/r/20260610030208.2020275-1-zychennvt@gmail.com/
> 
> Changes in v4:
>   - Patch 1 (dt-bindings):
>     - Update example interrupt number.
>   - Patch 2 (driver):
>     - Remove redundant spinlocks and fix 'irq' type to signed.
>     - Fix target address recovery in ma35d1_i2c_reset().
>     - Refactor IRQ handler for multi-msg reads and NACK/IGNORE_NAK.
>     - Fix timeout UAF via explicit IRQ disabling during recovery.
>     - Drop IRQF_SHARED and fix PM paths in probe/unregistration.
>     - Limit suspend/resume wakeup logic to target mode only.
>   - Patch 3 (dts):
>     - Add missing i2c0 node to dtsi.
>     - Switch SoM configuration from i2c1 to i2c2 with updated pinctrl.
>     - Add nau8822 audio codec node under i2c2 on the SoM board.
>     - Drop redundant i2c0 alias and clean up dtsi property ordering.
>   v3: https://lore.kernel.org/r/20260512073953.564323-1-zychennvt@gmail.com/
> 
> Changes in v3:
>   - Fix minor DTS formatting issues (whitespace, missing newline)  
>   v2: https://lore.kernel.org/r/20260316063726.41048-1-zychennvt@gmail.com
> 
> Changes in v2:
>   - Overall:
>     - Rebase on linux-i2c/i2c-next
>     - Switched terminology from "master/slave" to "controller/target".  
>   - Patch 1 (dt-bindings):
>     - Simplified description and fixed 'reg' size in example.
>   - Patch 2 (driver):
>     - Modernized using devm_*, generic device properties, and FIELD_PREP/GENMASK.
>     - Optimized power management by moving clock control to runtime PM.
>     - Simplified code by removing redundant .remove(), .owner, and inlines.
>     - Added dev_err_probe() and default bus frequency handling.
>   - Patch 3 (dts):
>     - Moved i2c aliases to board dts and reordered nodes alphabetically.
>   v1: https://lore.kernel.org/r/20260302020822.13936-1-zychennvt@gmail.com
> 
> Zi-Yu Chen (3):
>   dt-bindings: i2c: nuvoton,ma35d1-i2c: Add MA35D1 I2C controller
>   i2c: ma35d1: Add Nuvoton MA35D1 I2C driver support
>   arm64: dts: nuvoton: Add I2C nodes for MA35D1 SoC
> 
>  .../bindings/i2c/nuvoton,ma35d1-i2c.yaml      |  63 ++
>  .../boot/dts/nuvoton/ma35d1-som-256m.dts      |  20 +
>  arch/arm64/boot/dts/nuvoton/ma35d1.dtsi       |  72 ++
>  drivers/i2c/busses/Kconfig                    |  13 +
>  drivers/i2c/busses/Makefile                   |   1 +
>  drivers/i2c/busses/i2c-ma35d1.c               | 800 ++++++++++++++++++
>  6 files changed, 969 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/i2c/nuvoton,ma35d1-i2c.yaml
>  create mode 100644 drivers/i2c/busses/i2c-ma35d1.c
> 


  parent reply	other threads:[~2026-10-16  2:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16  1:04 [PATCH v11 0/3] i2c: ma35d1: Add support for MA35D1 I2C controller Zi-Yu Chen
2026-10-16  1:04 ` [PATCH v12 1/3] dt-bindings: i2c: nuvoton,ma35d1-i2c: Add " Zi-Yu Chen
2026-10-16  1:04 ` [PATCH v12 2/3] i2c: ma35d1: Add Nuvoton MA35D1 I2C driver support Zi-Yu Chen
2026-10-16  1:17   ` sashiko-bot
2026-10-16  2:41     ` zychen
2026-10-16  1:04 ` [PATCH v12 3/3] arm64: dts: nuvoton: Add I2C nodes for MA35D1 SoC Zi-Yu Chen
2026-10-16  2:40 ` zychen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-10-01  7:50 [PATCH v11 0/3] i2c: ma35d1: Add support for MA35D1 I2C controller Zi-Yu Chen

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=17bf5ca0-c071-4ba8-b168-3ffbdae629ad@gmail.com \
    --to=zychennvt@gmail.com \
    --cc=andi.shyti@kernel.org \
    --cc=andrew@codeconstruct.com.au \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=schung@nuvoton.com \
    --cc=ychuang3@nuvoton.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