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 2E19320485B for ; Sat, 19 Jul 2025 08:00:07 +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=1752912007; cv=none; b=jX2B/U6/2MbzhvmdcK6IdBXR7DGijB2bE4824QGyaUiCd4ytYTBwIzIwJyDsbLU6SkvA/OOFr5SRlmBSg8ejZT5hD8VvLiY2eWTyufb3VI+9tM/OfPZmJB+KQCBo1O3Ch9cAGqLk2xzf+rDqfMbsGQhkDCQEjEj/6vxE0c/0pRQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752912007; c=relaxed/simple; bh=SbWV3dkN+6JrGiFhFxfQLmA/6ViUemH2WsRgB16IRlU=; h=Subject:To:From:Date:Message-ID:MIME-Version:Content-Type; b=jTLtjunrvaptCamv0P3AmdLU2mIjXq4kRcuEDeSyV6Sjzw+xcfstWGElOt1zaDrD4VPU934y7ShGKlQNOEPkIjOCZXpa76r05ZI9S88bbm4g31jq9NqbOYO1BAUPvG9XLx82dF0HSYXsGNm5Er/XpbXzBVUOJdSbvVIZ0kWqof4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=rSJPSror; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="rSJPSror" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E55DC4CEE3; Sat, 19 Jul 2025 08:00:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1752912007; bh=SbWV3dkN+6JrGiFhFxfQLmA/6ViUemH2WsRgB16IRlU=; h=Subject:To:From:Date:From; b=rSJPSrorWXLWd25oA/B0oWkTDbubnxRiGGkLdWrXC+wswRK0L36SR1o7LQkoe0w6W cDRD+vzVpha6cQ5gagSAYO9mjnu43+lZPZFerZACwsLEZIWcGUFv8hXc0fGKFe/Shx MOAXA1sCZ8w6j3VbuDYmz3AZ4Wg8F5pZGDm7iTaU= Subject: patch "iio: adc: ad7173: fix setting ODR in probe" added to char-misc-testing To: dlechner@baylibre.com,Jonathan.Cameron@huawei.com,Stable@vger.kernel.org From: Date: Sat, 19 Jul 2025 09:49:37 +0200 Message-ID: <2025071937-blabber-latitude-a14f@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit This is a note to let you know that I've just added the patch titled iio: adc: ad7173: fix setting ODR in probe to my char-misc git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git in the char-misc-testing branch. The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.) The patch will be merged to the char-misc-next branch sometime soon, after it passes testing, and the merge window is open. If you have any questions about this process, please let me know. From 6fa908abd19cc35c205f343b79c67ff38dbc9b76 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Thu, 10 Jul 2025 15:43:40 -0500 Subject: iio: adc: ad7173: fix setting ODR in probe Fix the setting of the ODR register value in the probe function for AD7177. The AD7177 chip has a different ODR value after reset than the other chips (0x7 vs. 0x0) and 0 is a reserved value on that chip. The driver already has this information available in odr_start_value and uses it when checking valid values when writing to the sampling_frequency attribute, but failed to set the correct initial value in the probe function. Fixes: 37ae8381ccda ("iio: adc: ad7173: add support for additional models") Signed-off-by: David Lechner Link: https://patch.msgid.link/20250710-iio-adc-ad7173-fix-setting-odr-in-probe-v1-1-78a100fec998@baylibre.com Cc: Signed-off-by: Jonathan Cameron --- drivers/iio/adc/ad7173.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iio/adc/ad7173.c b/drivers/iio/adc/ad7173.c index 2173455c0169..4413207be28f 100644 --- a/drivers/iio/adc/ad7173.c +++ b/drivers/iio/adc/ad7173.c @@ -1589,6 +1589,7 @@ static int ad7173_fw_parse_channel_config(struct iio_dev *indio_dev) chan_st_priv->cfg.bipolar = false; chan_st_priv->cfg.input_buf = st->info->has_input_buf; chan_st_priv->cfg.ref_sel = AD7173_SETUP_REF_SEL_INT_REF; + chan_st_priv->cfg.odr = st->info->odr_start_value; chan_st_priv->cfg.openwire_comp_chan = -1; st->adc_mode |= AD7173_ADC_MODE_REF_EN; if (st->info->data_reg_only_16bit) @@ -1655,7 +1656,7 @@ static int ad7173_fw_parse_channel_config(struct iio_dev *indio_dev) chan->scan_index = chan_index; chan->channel = ain[0]; chan_st_priv->cfg.input_buf = st->info->has_input_buf; - chan_st_priv->cfg.odr = 0; + chan_st_priv->cfg.odr = st->info->odr_start_value; chan_st_priv->cfg.openwire_comp_chan = -1; chan_st_priv->cfg.bipolar = fwnode_property_read_bool(child, "bipolar"); -- 2.50.1