The DW9718S voice coil motor is found on various smartphones like motorola-nora that are currently being worked on in the postmarketOS community. Since the way it operates is very similar to DW9719, this patch series adds support for it to the existing dw9719 driver. Because that driver did not yet support DT, we also add DT bindings and the dongwoon,dw9719 ofw compatible. With DW9718S, the driver was tested fully, including runtime PM.
This is a follow-up of [1] and [2]. Changes compared to previous submission: * Deprecate dongwoon,vcm-freq in favor of dongwoon,vcm-prescale * Instead of per-device config struct use model ID to handle cases [1] https://lore.kernel.org/linux-media/[email protected]/ [2] https://lore.kernel.org/linux-media/[email protected]/ Signed-off-by: André Apitzsch <[email protected]> --- Changes in v2: - Add patch (3) which removes i2c device table - Restructure patches because of that - keep patches 1 and 2 - add patch 3 - patch 6 becomes patch 4 - patch 3 becomes patch 5 - patch 4 becomes patch 6 - patch 5 becomes patch 7 - patch 7 becomes patch 8 - Patch 1 (bindings) - Remove unneeded 'minimum: 0' - Remove if/then that handles 'default' to reduce complexity - Add myself as maintainer - Patch 5 - Fix void-pointer-to-enum-cast warning - Patch 7 - Drop pm_runtime_mark_last_busy(); it is already called by pm_runtime_put_autosuspend() - Patch 8 - Remove extra parentheses - Print error if writing to power register fails - Add reason for doubled waiting time during power up to comment - Pass NULL instead of unused 'ret' to cci_write() - Link to v1: https://lore.kernel.org/r/[email protected] --- André Apitzsch (3): dt-bindings: media: i2c: Add DW9718S, DW9719 and DW9761 VCM media: i2c: dw9719: Deprecate dongwoon,vcm-freq media: i2c: dw9719: Remove unused i2c device id table Val Packett (5): media: i2c: dw9719: Add an of_match_table media: i2c: dw9719: Add driver_data matching media: i2c: dw9719: Add DW9718S support media: i2c: dw9719: Update PM last busy time upon close media: i2c: dw9719: Fix power on/off sequence .../bindings/media/i2c/dongwoon,dw9719.yaml | 88 +++++++++++++++++ drivers/media/i2c/dw9719.c | 110 +++++++++++++++++---- 2 files changed, 178 insertions(+), 20 deletions(-) --- base-commit: 846bd2225ec3cfa8be046655e02b9457ed41973e change-id: 20250709-dw9719-8a8822efc1b1 Best regards, -- André Apitzsch <[email protected]>

