mbox series

[v2,0/2] nvmem: add Microchip OTP controller

Message ID 20220517125822.579580-1-claudiu.beznea@microchip.com
Headers show
Series nvmem: add Microchip OTP controller | expand

Message

Claudiu Beznea May 17, 2022, 12:58 p.m. UTC
Hi,

This series adds support for Microchip OTP controller available on
SAMA7G5. The driver gives access to a non-volatile memory which
keeps (at the moment) information like booting media and temperature
calibration data used for thermal measurements.

Thank you,
Claudiu Beznea

Changes in v2:
- updated the bindings (patch 1/2) as follows:
	- included the device name in files names and updated binding
	  content accordingly
	- updated the description
	- removed address-cells, size-cells
	- removed clock include
	- use GPL-2.0 OR BSD-2-Clause license
	- removed OTP_PKT_SAMA7G5_TEMP_CALIB_LEN and keep hardcoded
	  value in examples
	  
- updated MAINTAINERS file with new naming of bindings

Claudiu Beznea (2):
  dt-bindings: microchip-otpc: document Microchip OTPC
  nvmem: microchip-otpc: add support

 .../nvmem/microchip-sama7g5,otpc.yaml         |  50 +++
 MAINTAINERS                                   |   8 +
 drivers/nvmem/Kconfig                         |   7 +
 drivers/nvmem/Makefile                        |   2 +
 drivers/nvmem/microchip-otpc.c                | 288 ++++++++++++++++++
 .../nvmem/microchip-sama7g5,otpc.h            |  12 +
 6 files changed, 367 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/nvmem/microchip-sama7g5,otpc.yaml
 create mode 100644 drivers/nvmem/microchip-otpc.c
 create mode 040000 include/dt-bindings/nvmem
 create mode 100644 include/dt-bindings/nvmem/microchip-sama7g5,otpc.h

Comments

Krzysztof Kozlowski May 17, 2022, 2:08 p.m. UTC | #1
On 17/05/2022 14:58, Claudiu Beznea wrote:

Thank you for your patch. There is something to discuss/improve.

> +static const struct of_device_id mchp_otpc_ids[] = {
> +	{ .compatible = "microchip,sama7g5-otpc", },
> +	{ },
> +};
> +MODULE_DEVICE_TABLE(of, mchp_otpc_ids);
> +
> +static struct platform_driver mchp_otpc_driver = {
> +	.probe = mchp_otpc_probe,
> +	.driver = {
> +		.name = MCHP_OTPC_NAME,
> +		.of_match_table = of_match_ptr(mchp_otpc_ids),

This still has incorrect pair of of_match_ptr/maybe_unused. Either both,
or none.


Best regards,
Krzysztof