From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (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 7E66340B0E5 for ; Mon, 17 Aug 2026 11:43:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786967015; cv=none; b=IT9MAPmLPn5UO48fYRyhFztiTrumniPiCM+ptGLkrASm5a680+S65JBvICK8wrSmmi2lhsmOvFI0SDv0XVlLy/F5mmDRkedidN8nw0K/QMrnvFC1V4J0uNDxZpM9nCP9CzlY2Q/XMOf3E/JmITRkuwThFjudqB6u1dxxWFxz8fc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786967015; c=relaxed/simple; bh=fIskz79NQn02ibLnjRh7ZKaMY8crCq3Jl1RoqA/q/5w=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=QywXkx4ts/slg7Gqbkwg2AbARzs9YpQ/j3hbg7fjh7vOX32KKTtA45E3tPK6uVfl8lyw2QOCx6bRI1SIic1GYbyOxT7m8qj9om8DkEC/JSIeex95tYAp9UUxouJXhK171ZdoiFkTkDS4dtbTacBm6Vu0tYt7eFSd6eZHbukK548= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=dqif9PHh; arc=none smtp.client-ip=209.85.167.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dqif9PHh" Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-5b2a3166398so3654540e87.3 for ; Mon, 17 Aug 2026 04:43:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786967001; x=1787571801; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=b6OMi1IqNUrs5qkhXZCHNpckPTiNqfFRI2wV9B5mW3o=; b=dqif9PHhOo6cNfwcR2c4I91a3a+La3/EWt2HdIASFCluWz0R26IhVJ6fECFGM0icAx YhemFBlcJDtyiMxiPk+6rnZKqR8Rq3tUeA2zFephgcauoYuEw852y/LhSiEjN/DKjJyK gSrPZE5C7dLJyAQlaKu14fkmGm6LHjemE6jXxmwBXlv1gsyUjMKKtrzebdUz3m4vgg7C Y0y4iI+kHrFWCeB3vUjFqQH+62SWM9ueJKS8ga2chlo1u2/cuVbvNqHGbjsKzRGIQvHM eKYoh1TEzNtjk1CrAr6MM6Yp41XLBRwhYUVaBX0cQC0XsiWJqRFd9LOtkKxi0Vm00ZQz 6RrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786967001; x=1787571801; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=b6OMi1IqNUrs5qkhXZCHNpckPTiNqfFRI2wV9B5mW3o=; b=ByEPsss/1ih4YidKnwm2NMy5ixPrr0jl585W2qQxzoB89Pk0ciiUFF87+C0tPrGpPf SicPoJRQ0TLLXrKlpSKSBG1AJtsgVnSibFwIQh6/WMCqHfrVovyqo3fTt7Xds7tjt+IH 2vHhauIJSa1G7I0oDj+weFtWk+VcBWCVigTUZzAocAYoKX66aPSwT+F3aoYq+Jwfb1Qd AUindzXXJTijb7jhgAoAeFvLj1vMLLN+iz2g5FCHluRMfGW/tSA5UJT3GnpTWKhS0NfJ cSv3aLUCjsh/Sg7rf3PVVZWCuAE5NjMZ2G94nhgIwGydEol8WsRr1KKyjPiCiUXaQnV7 W+1Q== X-Forwarded-Encrypted: i=1; AHgh+RqZnr54GDHZuftJ951aEybJIbUdwSBwpv3WnPKrckEHkdA0DeyuBa2XzPUpR/kJX99ssuN85lubHfHwZrQ=@vger.kernel.org X-Gm-Message-State: AOJu0YzhBTvOqu93sfTaEAylG0swVMn+JUNVQU+/XUBz87wqoN1BMJX5 1CZ3JA86IwniDfpftOFIYUEkwuBXBpQ9hv+kCxP96fKnm9xPnmqICNPc X-Gm-Gg: AR+sD131K1r48pbwav15GBy06wkCJ5XGvS/QfKV/SSyN4d8keWRPw1Y1OzeLteBsYSK RtvOt5jZ7Y9jZEWbq+QOTyAgK1xuYmPn5UR8s6Mr09eVrIeJQgz9RXy5wEA9Ky+a6q4cwdiKPEW FUGb+nfllo3vxqRhOiuUjr1cGm+YvB3Uxi9dV8Tt7mHHVp/d51VOfNmQcAZD/hrxUYDcTD4GzcQ x4icuzlviEteoGu/NHfz40ah01cEhtqMT7BJ+EOvNfLggmGbhsm4lJeijwbWCLPRa0D6zeL2+1/ ySXBp7ArJ2MWNi/316rOjs34nZLVbNvtMNU9SSEK8OgBeGidp9vlrg3ZsQiCBLfI6RFQ0+ulHkZ N0xY/IZ0DnYntgfACWYMDx8KAv/Oa921giN8GBnnWZdMI5f6pv2wjyodX9wqTf55FM7cU6ywVGy 0EynOReTB/PDF5XwWY/f3b6MMeTlGMw8t/UDcsO/J/qC81SLtlwlWvmdUnunY6S9PZzrdq7NZeS 8geEGWFBKCgw6q86CCv0ivciS09+0tw94eiR9/ocrav X-Received: by 2002:a05:6512:6892:b0:5ae:bf45:e3be with SMTP id 2adb3069b0e04-5b45916afe7mr1885655e87.21.1786967001285; Mon, 17 Aug 2026 04:43:21 -0700 (PDT) Received: from ?IPV6:2a10:a5c0:800d:dd00:8fdf:935a:2c85:d703? ([2a10:a5c0:800d:dd00:8fdf:935a:2c85:d703]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5b46cfa0e69sm330552e87.23.2026.08.17.04.43.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Aug 2026 04:43:19 -0700 (PDT) Message-ID: <0498393a-1313-4781-8afc-6dab918233b6@gmail.com> Date: Mon, 17 Aug 2026 14:43:18 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 12/12] iio: accel: kionix-kx022a: Fix IPOL macro name To: Jonathan Cameron , Matti Vaittinen Cc: Matti Vaittinen , 0012-iio-accel-kx022a-Fix-IPOL-macro-name.patch@mva-rohm, David Lechner , =?UTF-8?Q?Nuno_S=C3=A1?= , Andy Shevchenko , Javier Carrasco , Mehdi Djait , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Kalle Niemi , =?UTF-8?Q?Topi_Sonkaj=C3=A4rvi?= References: <20260817025351.5d3baf14@jic23-huawei> Content-Language: en-US, en-AU, en-GB, en-BW From: Matti Vaittinen In-Reply-To: <20260817025351.5d3baf14@jic23-huawei> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 17/08/2026 04:54, Jonathan Cameron wrote: > On Mon, 10 Aug 2026 10:55:25 +0300 > Matti Vaittinen wrote: > >> From: Matti Vaittinen >> >> The "interrupt polarity high" -macro for KX022A variant is defined as: >> However, the KX022A_MASK_IPOL1 is not defined anywhere, so actually >> using the KX022A_IPOL_HIGH would produce a compile error. >> >> Fix the define by using correct mask. >> >> Signed-off-by: Matti Vaittinen >> Fixes: 7c1d1677b322 ("iio: accel: Support Kionix/ROHM KX022A accelerometer") >> >> --- >> It appears the KX022A_IPOL_HIGH is unused as the IRQ is currently, >> unconditionally set level low in kx022a_prepare_irq_pin(). The KX022A >> hardware would support other configurations though. So, another >> potential fix would be removing the define altogether. I decided to >> leave the define there, as having it will allow users who need different >> configuration to simply change the KX022A_IPOL_LOW to KX022A_IPOL_HIGH, >> which is kind of a "easy to try" thing. > > Handling interrupt polarity options at the device end is typically a > 'feature' rather than a must have given in most cases we don't have sharing > going on and these days interrupt controllers can cope with most types > of input. If anyone needs it they can propose support. I take this as a "please, drop the unused define rather than fix it". > Note I've never been happy with how we do this when we do support it > because the argument for letting DT set the polarity is there may be > not gates or similar in the path so the driver can't know, yet if we > read the type to set the polarity at the driver end we are saying we > do know there aren't any such not gate (trick for level shifting on > the cheap). I haven't figured out a better binding. I was more thinking of people who do downstream projects than a proper upstream support including nice mechanism to select appropriate polarity. It's quite easy to experiment (and carry a downstream patch) with one-line define change. Especially so when defines are already there. Yours, -- Matti -- Matti Vaittinen Linux kernel developer at ROHM Semiconductors Oulu Finland ~~ When things go utterly wrong vim users can always type :help! ~~