From: Ariana Lazar <ariana.lazar@microchip.com>
To: "Ariana Lazar" <ariana.lazar@microchip.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>
Cc: <linux-iio@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH v2 0/2] Adding support for Microchip MCP47FEB02
Date: Mon, 3 Nov 2025 17:50:28 +0200 [thread overview]
Message-ID: <20251103-mcp47feb02-v2-0-8c37741bd97a@microchip.com> (raw)
Adding support for Microchip MCP47F(E/V)B(0/1/2)1, MCP47F(E/V)B(0/1/2)2,
MCP47F(E/V)B(0/1/2)4 and MCP47F(E/V)B(0/1/2)8 series of buffered voltage
output Digital-to-Analog converters with an I2C Interface. This driver
covers the following part numbers:
- With nonvolatile memory:
- MCP47FEB01, MCP47FEB11, MCP47FEB21, MCP47FEB02, MCP47FEB12
- MCP47FEB22, MCP47FVB01, MCP47FVB11, MCP47FVB21, MCP47FVB02
- With volatile memory:
- MCP47FVB12, MCP47FVB02, MCP47FVB12, MCP47FVB22, MCP47FVB04
- MCP47FVB14, MCP47FVB24, MCP47FVB04, MCP47FVB08, MCP47FVB18
- MCP47FVB28, MCP47FEB04, MCP47FEB14 and MCP47FEB24
The families support up to 8 output channels. The devices can be 8-bit,
10-bit and 12-bit resolution.
---
Changes in v2:
v2:
- fix review comments device tree binding:
corrected the use of patternProperties and enum with an array of
channel numbers instead of minimum/maximum
gave more specific names to the labels of the channels
removed '|' from where it was unneccesarry
removed unneccesarry setting of attributes to true
- fix review comments driver:
replaced custom write function with regmap_update_bits.
added read_flag_mask field to regmap_config struct and shifted all
register addresses with 3 bits in order to correctly apply R/W
command mask
changed cache_type field of regmap_config structs to REGCACHE_MAPLE
added val_format_endian field to regmap_config struct as
REGMAP_ENDIAN_BIG
kept in powerdown_mode last value written to register before reloading
the driver
created defines for magic bits used in probe function
removed unneccesarry channel enabled checks
added in parse_fw initialization of reg with 0, check for valid
reg number after reading it from devicetree and nonzero num_channels
initialized vref_mv, vref1_mv, vdd_mv
replaced CH_0, ... CH_7 masks with DAC_CTRL_BITS(ch) and G_0, ... G_7
with DAC_GAIN_BIT(ch)
corrected write_powerdown function to write normal operation into
specific bit mask from power-down register when a channel exits
power-down mode.
added const pointer to info in data struct
deleted device_property_present checks for vref, vref1. Read vref1 only
if have_ext_vref1 is present in features
protected write operations with mutex using scoped_guard or guard
refactored probe function by creating 2 setup functions,
mcp47feb02_init_ctrl_regs and mcp47feb02_init_ch_scales.
corrected info/debug messages where it was specified
used devm_iio_device_register and deleted remove() function
in write_raw only update struct data if regmap write succeeds
v1:
- first version committed to review
- Link to v1: https://lore.kernel.org/r/20250922-mcp47feb02-v1-0-06cb4acaa347@microchip.com
Signed-off-by: Ariana Lazar <ariana.lazar@microchip.com>
---
Ariana Lazar (2):
dt-bindings: iio: dac: adding support for Microchip MCP47FEB02
iio: dac: adding support for Microchip MCP47FEB02
.../bindings/iio/dac/microchip,mcp47feb02.yaml | 302 +++++
MAINTAINERS | 7 +
drivers/iio/dac/Kconfig | 16 +
drivers/iio/dac/Makefile | 1 +
drivers/iio/dac/mcp47feb02.c | 1233 ++++++++++++++++++++
5 files changed, 1559 insertions(+)
---
base-commit: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
change-id: 20250825-mcp47feb02-31c77857ae29
Best regards,
--
Ariana Lazar <ariana.lazar@microchip.com>
next reply other threads:[~2025-11-04 8:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-03 15:50 Ariana Lazar [this message]
2025-11-03 15:50 ` [PATCH v2 1/2] dt-bindings: iio: dac: adding support for Microchip MCP47FEB02 Ariana Lazar
2025-11-04 18:09 ` Conor Dooley
2025-11-03 15:50 ` [PATCH v2 2/2] " Ariana Lazar
2025-11-04 10:25 ` Andy Shevchenko
2025-11-09 15:53 ` Jonathan Cameron
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=20251103-mcp47feb02-v2-0-8c37741bd97a@microchip.com \
--to=ariana.lazar@microchip.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=robh@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;
as well as URLs for NNTP newsgroup(s).