Message ID | 20240216185008.1370618-1-megi@xff.cz |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-69207-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp716896dyb; Fri, 16 Feb 2024 10:51:23 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXqs8Lmjx/M4AklmZ4adhruEpVYb2YZi6vjhhOqoDrI/FO7VBKgfo/OofKOStT5mdrdalA6qSp/7xCzv+KYoTqnL4o0Ww== X-Google-Smtp-Source: AGHT+IHDG0zzUF/hiazwIpt1np3TM3kYGjD4DZkqbkrVYpQS5Rm56nol5rmVDnVvFnT30jQ6I6DY X-Received: by 2002:a05:6830:3d0d:b0:6e1:43a4:c412 with SMTP id eu13-20020a0568303d0d00b006e143a4c412mr5450200otb.32.1708109483560; Fri, 16 Feb 2024 10:51:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708109483; cv=pass; d=google.com; s=arc-20160816; b=XYJAtg1ACvz2z9o3ui+1Q1OSF4WmhE0Ol80zu7mtbpnwqYflHq9dc5Ptqy1dDVe7wg lstwyboLpAZVwgkkGjloF+1ww5nOakAuB11qba6Vho3ILUP8PIr0I6WKgko8DkHiWqjz YoJY/YBPfK5SUBM+s5dFWd64t869m36HUpCOp+l0MPENJAVppq7yur43OAmjnkw+YGPY gaDb2TG3tn955NqyTdaqQI7mQnlFLbSRVIdE81zOatDkAMhLK+8cp4wTBrBAAYgOZ4Vo Uygm6A0x6mGaUUC6NsdWPZSxgDmDmxbTAKcqcF/iCvqZEDKSuQsRkbfQyJQNGZA7WVqs skvw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=oGH3RTeLyKqldRSwPTeAnn+CXYmy9AUo2JgpKS1hwhg=; fh=d9zgdqCmRx36+BVYAt1Fzz77IeXQIiiUNWHDpCCL3Ro=; b=0tzoHhbW2iQV3Wydw4PKb/4KHHW1KiTBsHcO8asvHEIR98COwEX8xCot8/Ff+TMQUC cmjT1MSpdUAOdQqhLz7G3G56gXLZjNmWi4YeD67Qm6Wt717hYvcblBfHQAVf03oOsjPg 4XiJ+kBLwK/UsMXlQ76FWBFmzYYrrzSywNYG9JVGlxPLX2Bgde8I56N9q4k1dUgkHetJ CCEJj5QpnCzuZhsXcBvtN9vZ/0IfytwlVCXJ2q0Ve+na1FNjS8K/MuSLl17X204+zI04 ll0/5XIp4M7hfJw12hziGGjsKdA6JKDlVZqjlLLE5UUa8BhVvtqJMcMfoUfDahNzhoBF 6IUA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b=sVZ6F8Qi; arc=pass (i=1 spf=pass spfdomain=xff.cz dkim=pass dkdomain=xff.cz dmarc=pass fromdomain=xff.cz); spf=pass (google.com: domain of linux-kernel+bounces-69207-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69207-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xff.cz Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id b23-20020a05620a04f700b007871d41a880si426418qkh.644.2024.02.16.10.51.23 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 10:51:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69207-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b=sVZ6F8Qi; arc=pass (i=1 spf=pass spfdomain=xff.cz dkim=pass dkdomain=xff.cz dmarc=pass fromdomain=xff.cz); spf=pass (google.com: domain of linux-kernel+bounces-69207-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69207-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xff.cz Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 532281C21587 for <ouuuleilei@gmail.com>; Fri, 16 Feb 2024 18:51:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3EB5C13AA46; Fri, 16 Feb 2024 18:50:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xff.cz header.i=@xff.cz header.b="sVZ6F8Qi" Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1EA931350FB; Fri, 16 Feb 2024 18:50:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.181.215.36 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708109421; cv=none; b=pwW1M771SSzr40YQVZN4e6M7LLwca0EuNah8xXmaqeMwP7yIlQpMKc4Me93kqNs9B71pS5cHpvRS0BbIa887UwCPQj+cNeKg1XOgbirmly0IwN0r5GJc647ADyi/Ic/kuEmyXQks4Kd+qHYBsc0NAjDCUrYegp4UjSpH2YBZqYU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708109421; c=relaxed/simple; bh=51kgdgBqZYvIt5QFXzzBCP1nSeOtXNnvlQSNHeq2iNE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=VxgOFqR0bJVKjxbIZ92p8Yh1PX2iBZ2tAGX1R0AOI1EZ3SmmOn9v0u0IqYW+AMgqpVRlbg+RW+8RNjzWhWjWgHuVz4sajScIkRF2J8fYQi42HHBIUNF7peUVBUmdZm5rZuRgiLgib/1TeGgJp/EQNUR4+z84+RAzANAvZ0mnXYg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=xff.cz; spf=pass smtp.mailfrom=xff.cz; dkim=pass (1024-bit key) header.d=xff.cz header.i=@xff.cz header.b=sVZ6F8Qi; arc=none smtp.client-ip=195.181.215.36 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=xff.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xff.cz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xff.cz; s=mail; t=1708109415; bh=51kgdgBqZYvIt5QFXzzBCP1nSeOtXNnvlQSNHeq2iNE=; h=From:To:Cc:Subject:Date:From; b=sVZ6F8QiwTZWzwbbkdtBDytu0NHg8y9VD/C31d+ZyNDOw1h+3AwTLXFlSFfWMwT64 OqaUrHwB5kR5tt53iCI62v2aAZZLpv11oT/JLFVZ2KOW2vR+VFku7FHL4eZ73juj7H yX5AE9fSJAgHOUTWrzaGcimZ4hnyYHwKeI1iu4OM= From: =?utf-8?q?Ond=C5=99ej_Jirman?= <megi@xff.cz> To: Jonathan Cameron <jic23@kernel.org>, Lars-Peter Clausen <lars@metafoo.de>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Andrey Skvortsov <andrej.skvortzov@gmail.com> Cc: Ondrej Jirman <megi@xff.cz>, Icenowy Zheng <icenowy@aosc.io>, Dalton Durst <dalton@ubports.com>, Shoji Keita <awaittrot@shjk.jp>, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/4] Add support for AF8133J magnetometer Date: Fri, 16 Feb 2024 19:49:58 +0100 Message-ID: <20240216185008.1370618-1-megi@xff.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791082610067467121 X-GMAIL-MSGID: 1791082610067467121 |
Series |
Add support for AF8133J magnetometer
|
|
Message
Ondřej Jirman
Feb. 16, 2024, 6:49 p.m. UTC
From: Ondrej Jirman <megi@xff.cz>
This series adds support for AF8133J magnetometer sensor. It's a simple
3-axis sensor with two sensitivity options and not much else to it.
This sensor is used on both Pinephone and Pinephone Pro. DT patches
adding it will come later, once this driver is merged.
Please take a look. :)
Thank you very much,
Ondřej Jirman
v3:
- collect more tags
- if (ret < 0) -> (ret) where appropriate
- scoped guard move to af8133j_set_scale()
- remove pm_runtime_disable/enable guard from af8133j_power_down_action()
- pretty much just this:
https://megous.com/dl/tmp/0001-if-ret-0-ret-where-appropriate.patch
https://megous.com/dl/tmp/0002-scoped-guard-move-to-af8133j_set_scale.patch
https://megous.com/dl/tmp/0003-remove-pm_runtime_disable-enable-guard-from-af8133j_.patch
v2:
- move maintainers patch to the end of series
- bindings:
- fix compatible definition in bindings file
- require power supplies
- fix descriptions
- driver:
- sort includes
- rework RPM, the driver should now work with RPM disabled
among other improvements
- I've tested RPM left and right doing device bind/unbind under
various conditions, system suspend under various conditions,
etc.
- use scoped_guard for mutexes
- use devm for power down and handle power down correctly with both
RPM enabled/disabled without tracking power state in data->powered
- fix issue with changing scale while RPM suspended
- various code formatting issues resolved
- as for sign-offs, I've added co-developed-by for people I know for
sure worked on the driver, and left other tags as they were when
I picked up the patch 2 years ago to my Linux branch
Icenowy Zheng (3):
dt-bindings: vendor-prefix: Add prefix for Voltafield
dt-bindings: iio: magnetometer: Add Voltafield AF8133J
iio: magnetometer: add a driver for Voltafield AF8133J magnetometer
Ondrej Jirman (1):
MAINTAINERS: Add an entry for AF8133J driver
.../iio/magnetometer/voltafield,af8133j.yaml | 60 ++
.../devicetree/bindings/vendor-prefixes.yaml | 2 +
MAINTAINERS | 6 +
drivers/iio/magnetometer/Kconfig | 12 +
drivers/iio/magnetometer/Makefile | 1 +
drivers/iio/magnetometer/af8133j.c | 524 ++++++++++++++++++
6 files changed, 605 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/voltafield,af8133j.yaml
create mode 100644 drivers/iio/magnetometer/af8133j.c