From patchwork Mon Feb 17 14:01:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13977881 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 240AF33DF for ; Mon, 17 Feb 2025 14:01:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739800906; cv=none; b=Thd75dfMcqh7V0SglTS0Ceky4Zdm1Z7k7YefFkSHyRAP+CmWrClCT4vU1c2cut1KhiulKzIZcTaLWMcPoctXLX0+S3zlTAdXuCNrLuDFCCjEfE0/dv4mHrionFuAGPi/J0JR+FBuFQchVa1AqcauHBOfEYIzfPdqwSo25Rt17FQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739800906; c=relaxed/simple; bh=joZqa1kOkCOCZgherMEIQsuwWNb3hoU1WM+RYULVCCk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=sFMtfOBDim0ZSSmJy3R3PbQWFxGh5Q3dj168LGZaVQGNp3uNQJv1U08l/7JL/62OLJGLyOBZhNgTRrUbrAra71xdYyeKCNNCxy59Y3qTYOlG9Vsej14tUbMxfHFAE/4uQSjZ7b0877c2E7kTnWg9IkbdQHajaNEJ8tQJfpoBl0E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Qn+IBB1P; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Qn+IBB1P" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC030C4CED1; Mon, 17 Feb 2025 14:01:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739800905; bh=joZqa1kOkCOCZgherMEIQsuwWNb3hoU1WM+RYULVCCk=; h=From:To:Cc:Subject:Date:From; b=Qn+IBB1P1OOKdEDOZouQDoDqIzOwvC8TeJONXn6eXFdc2x45M+1++UjZrNrS0r+Gw d+bpjagb1QCj3KFjC7xkZJCk2UaVp8T5GbqcCFiDPZUGiid/kHBgKJZn7rj4lmE/w0 suPZlWDzJyj/JdV9Ij4DSoYacNUJ3dQlc7Ggu3YWNFWWBf5FOGaEbjRJse3LVDc8FV K91s/Uijap9xniQqwZh4poMBWoMV14J7kSA9R8SeFwRkZh9LXrx1wFTOjpe/gUTDp9 3Rzyag1hz3l2458wggr+wjBm8u5FIEYr47L2wAAYr3pU07qGOggPSJfLbtXGOnC6rI 5mtC8Z+oZ0iKA== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: David Lechner , =?utf-8?q?Nuno_S=C3=A1?= , Antoniu Miclaus , Matti Vaittinen , Jonathan Cameron Subject: [PATCH 0/8] IIO: Accelerometers: Sparse friendly claim of direct mode Date: Mon, 17 Feb 2025 14:01:27 +0000 Message-ID: <20250217140135.896574-1-jic23@kernel.org> X-Mailer: git-send-email 2.48.1 Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Jonathan Cameron Note that a number of the drivers touched in this series have no obvious active maintainer, so it would be much appreciated if anyone has time to take a look! This is effectively part 2 of what will probably be around 5 series focused on moving from iio_device_claim/release_direct_mode() to iio_device_claim/release_direct(). The new form is more consistent with conditional locking semantics and sparse markings have been added that let us detect miss-balance between claim and release. More details can be found in the cover letter of the first series: https://lore.kernel.org/all/20250209180624.701140-1-jic23@kernel.org/ This series focuses on the accelerometer drivers. There are a couple of fixes in here that showed up during the conversion. They are old issues in error paths that I guess no one hit in practice, so I see no reason to rush them in before the next merge window. Jonathan Cameron (8): iio: accel: mma8452: Ensure error return on failure to matching oversampling ratio iio: accel: mma8452: Factor out guts of write_raw() to simplify locking iio: accel: mma8452: Switch to sparse friendly iio_device_claim/release_direct() iio: accel: kx022a: Factor out guts of write_raw() to allow direct returns iio: accel: kx022a: Switch to sparse friendly iio_device_claim/release_direct() iio: accel: msa311: Fix failure to release runtime pm if direct mode claim fails. iio: accel: msa311: Switch to sparse friendly iio_device_claim/release_direct() iio: accel: Switch to sparse friendly iio_device_claim/release_direct() drivers/iio/accel/adxl372.c | 7 +-- drivers/iio/accel/adxl380.c | 7 +-- drivers/iio/accel/bma180.c | 7 +-- drivers/iio/accel/bmi088-accel-core.c | 7 ++- drivers/iio/accel/fxls8962af-core.c | 21 +++---- drivers/iio/accel/kionix-kx022a.c | 74 ++++++++++++----------- drivers/iio/accel/mma8452.c | 86 +++++++++++++-------------- drivers/iio/accel/msa311.c | 32 +++++----- 8 files changed, 119 insertions(+), 122 deletions(-) Reviewed-by: David Lechner