Received: by 2002:a05:7412:8d08:b0:f9:2d0a:d759 with SMTP id bj8csp169056rdb; Sun, 17 Dec 2023 06:56:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IF5QYzMtWcLV4PSujcuIxLwseUMU9/fIGfbxasQdHDxyXnHuf+XBlx8qlvci99YSv6lg+RV X-Received: by 2002:ac8:7dc4:0:b0:41c:e38c:5957 with SMTP id c4-20020ac87dc4000000b0041ce38c5957mr19774908qte.38.1702824984213; Sun, 17 Dec 2023 06:56:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702824984; cv=none; d=google.com; s=arc-20160816; b=AhqiY33RRqOXKFUtQpOq6w9Ov026i1hRpP6RDJbx5jqYR7Ag/MNa3faM08gEPhFriB HRBPJKl0l60ftG73GIpI4BY4jNq3ompPYn/5LGatZoSLcH8Kf6RBDpAKzw4idnJQYwaT 1EKeIhzEky9mh5NbQdHPcS8hASkquxylhiiVt4+BdEimdhIJhWvY32mxoP6PSI7cllGL NTwZPJfT+IcRxnvwUEAfB2/Q+3StqOF1O/oevgYC+4NrFeTk5T+D3SHK94/zjd2ic6fw vXH+2/Ugg1HoMnQZTorP+WPkrAxISGJN48Gjdg7HgPOGgAxNx5cbkIBqKkkUx7RATEhG pk6w== ARC-Message-Signature: i=1; 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:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=6n/Fxolv2BpXS2yzkY41isJS6f2BfN4oumSGn0RMKLI=; fh=IYtYDItZhYxUobJUE4h/DPNfo4t2DYpfZJxUzFo9Hpw=; b=HVOZFmNpUj9Pqcdg8XGn3w2V/cwIO2CXP5HwaNonT6JABP8AtfXr726ucWGwtvLQ4K lkLvmjiET0Mv642Ru2/dvOabuKO3z38BqXAxglP2gXkdcLI7UcR90teNO3ga1Hvixof/ 8FDB6fTx4TBST1PZYjYa4Xn7XM56vyh25uePSP7CTQH9+b2uez0mvyQDt99uOG5hBhxH X29EgI0nKXEHw6ha6QrNP15pVG496uh5cXxLhSu5may/RDgD4J7DPixDHGR4x7V/Un9g GnINpeVq+Cp9KJbILBGRBpQfZR7Imc1QmhrNfQKrQdPPFUK+AD+OGpP7JEjwgd0/emGI Y2PA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RY6aIoJ9; spf=pass (google.com: domain of linux-kernel+bounces-2656-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2656-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ey20-20020a05622a4c1400b0042377aef957si25182924qtb.288.2023.12.17.06.56.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 06:56:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2656-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RY6aIoJ9; spf=pass (google.com: domain of linux-kernel+bounces-2656-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2656-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 F17D61C21EAF for ; Sun, 17 Dec 2023 14:56:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 96B4744C84; Sun, 17 Dec 2023 14:56:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RY6aIoJ9" X-Original-To: linux-kernel@vger.kernel.org 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 BA49A1EB25; Sun, 17 Dec 2023 14:56:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D30F6C433C8; Sun, 17 Dec 2023 14:56:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702824975; bh=Sa7R+X1/EuMXebA+/AwvMnTGgalQNlLpxvYlZlFQHIo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RY6aIoJ9vR9NqPf9flT5HEsl8rVfyV7RHQQ80DwaosA0/VvnLWH6010xqUCdqngZB P5uFGXl3OcKl+yLxK9HKCGhm6GCMhuVGmfryUCtGMhu83XdqGVLQbjCY/oAs5uiTO5 IvX6oi2xcmSw0T7241DoUKrxGvAqf0NnRx3O7LdbIAxt1lf9HP3nfampD1+CC38EPp 03nvUsEkz7dq5N8CwILYH670JKPCnIA4H8v8dRPGEcsF1brLyGWclH6cA/1GMx3fpu 01vJXzO+kfltMK2YKLsiNR2xJWgVtVIR8+hPyoFHLe5Sl2kst2dbSNmdRniEaX+zas Lt1yBNou1wg8A== Date: Sun, 17 Dec 2023 14:55:57 +0000 From: Jonathan Cameron To: Marcelo Schmitt Cc: , , , , , , , , , , , , , , , Subject: Re: [PATCH v4 03/15] iio: adc: ad7091r: Set alert bit in config register Message-ID: <20231217145557.36d6a738@jic23-huawei> In-Reply-To: References: X-Mailer: Claws Mail 4.2.0 (GTK 3.24.38; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 16 Dec 2023 14:46:37 -0300 Marcelo Schmitt wrote: > The ad7091r-base driver sets up an interrupt handler for firing events > when inputs are either above or below a certain threshold. > However, for the interrupt signal to come from the device it must be > configured to enable the ALERT/BUSY/GPO pin to be used as ALERT, which > was not being done until now. > Enable interrupt signals on the ALERT/BUSY/GPO pin by setting the proper > bit in the configuration register. > > Signed-off-by: Marcelo Schmitt Hi Marcelo, In V3 review I asked if this should have a fixes tag. I've assumed for now the answer is no and applied it without. If you let me know fast enough I can probably slip on in, but if not you may want to consider requesting a backport after this is upstream. Applied to the togreg branch of iio.git and pushed out as testing for 0-day to take a look at it. Thanks, Jonathan > --- > drivers/iio/adc/ad7091r-base.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/iio/adc/ad7091r-base.c b/drivers/iio/adc/ad7091r-base.c > index 0e5d3d2e9c98..8aaa854f816f 100644 > --- a/drivers/iio/adc/ad7091r-base.c > +++ b/drivers/iio/adc/ad7091r-base.c > @@ -28,6 +28,7 @@ > #define AD7091R_REG_RESULT_CONV_RESULT(x) ((x) & 0xfff) > > /* AD7091R_REG_CONF */ > +#define AD7091R_REG_CONF_ALERT_EN BIT(4) > #define AD7091R_REG_CONF_AUTO BIT(8) > #define AD7091R_REG_CONF_CMD BIT(10) > > @@ -232,6 +233,11 @@ int ad7091r_probe(struct device *dev, const char *name, > iio_dev->channels = chip_info->channels; > > if (irq) { > + ret = regmap_update_bits(st->map, AD7091R_REG_CONF, > + AD7091R_REG_CONF_ALERT_EN, BIT(4)); > + if (ret) > + return ret; > + > ret = devm_request_threaded_irq(dev, irq, NULL, > ad7091r_event_handler, > IRQF_TRIGGER_FALLING | IRQF_ONESHOT, name, iio_dev);