This patch series introduces a staged refactoring of the Atmel crypto I2C
drivers in preparation for a shared core-based architecture. The goal is to
consolidate I2C client management and selection logic into a common
atmel-i2c core driver while keeping ECC (ECDH) and SHA204A client drivers
functionally separate but interoperating through shared infrastructure.
The series moves existing ECC-specific client tracking into a shared
management structure, relocates allocation and selection logic, and
introduces capability-based filtering for hardware selection. This allows
individual crypto drivers to request hardware clients based on supported
features while still benefiting from a unified least-loaded selection
strategy.
Subsequent patches extend this base by:
- migrating client management fully into the core driver,
- introducing explicit capability advertisement by each hardware client,
- updating ECC and SHA204A drivers to participate in capability-aware allocation,
- and cleaning up probe/remove paths to ensure consistent lifecycle handling.
No functional behavioral changes are intended at this stage beyond internal
refactoring and preparation for future feature expansion. The series is
designed to preserve existing crypto functionality while gradually
centralizing shared logic in the atmel-i2c core layer, reducing duplication
and improving maintainability across all Atmel crypto drivers.
Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
---
Lothar Rubusch (12):
crypto: atmel-ecc - rename driver_data before moving it into atmel-i2c
crypto: atmel - rename atmel_ecc_driver_data to atmel_i2c_client_mgmt
crypto: atmel - move i2c client management instance into core driver
crypto: atmel-ecc - simplify probe error handling
crypto: atmel - factor out i2c client unregistration helper
crypto: atmel-sha204a - add i2c hw client list and improve probe error
handling
crypto: atmel-sha204a - switch to module_i2c_driver
crypto: atmel-ecc - switch to module_i2c_driver
crypto: atmel-ecc - simplify remove path and relax busy handling
crypto: atmel-sha204a - guard remove path against missing client data
crypto: atmel - move i2c client selection to core driver
crypto: atmel - add capability-based I2C client selection
drivers/crypto/atmel-ecc.c | 98 ++++++++--------------------------
drivers/crypto/atmel-i2c.c | 54 +++++++++++++++++++
drivers/crypto/atmel-i2c.h | 12 ++++-
drivers/crypto/atmel-sha204a.c | 44 +++++++++------
4 files changed, 115 insertions(+), 93 deletions(-)
base-commit: 6c9dddeb582fde005360f4fe02c760d45ca05fb5
--
2.53.0