From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com [209.85.210.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 31633384CD5 for ; Fri, 7 Aug 2026 21:18:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786137526; cv=none; b=eIUgTpDPuvweckXUXQF5IryyLHSVjU1JTS6qGkZj4R92xpmZcrLu/ZRv5NpGoeG6XGCyUgZ8uplKvVbDePJEJRkyVZtLKGfdtufDEiY9Wwq6pXUPdMbj3AAFp2uNstTZC+SBOUx4P3wc96mhE6xKqjTq9LDEONRY9Ajyf1qXKnk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786137526; c=relaxed/simple; bh=ebwt30Y0Zh/vgceV7Qyq27GLp9L8sKExezLdZMd479U=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=q+mkSKvqqB3ts12fH6vyC2d7PM13wO8xZf4kZRQkilIBbbnubHy1zmPMkQQ/M6iZCxlYMNdsTYoR/VvR2pkFS1OeCOINPu85Kl95I/O9JKxG2qBhfi9NLt+xV2oEH/XnKgx9ccsxRYy6PYJUtkNT9qq0oc3oFsIUPGuErLD5QCI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b=SEJ8GflP; arc=none smtp.client-ip=209.85.210.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b="SEJ8GflP" Received: by mail-ot1-f53.google.com with SMTP id 46e09a7af769-7ec1e9d3359so34660a34.0 for ; Fri, 07 Aug 2026 14:18:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre.com; s=google; t=1786137523; x=1786742323; 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=iK39GoECH7eBfBcXOc+Hr3sqqq4Dev0XE+0hVdtjYDk=; b=SEJ8GflPOjHnbyen8qq6Wah5XTz/mU7kD/G76I1gauZa4siBlGDw6R47UGZW1hDc9W ZeKCBJpcWLSY01pzfuwffFHZtKjyODpuINq3zk1l1P2uXAE4vR5Wd0NAdRyjmmjC6ZT2 61oePwbIfsyjEFbXMrSh7sv5p53xqgfsyjrQe29qNYyxEL09GBWDHjmE4ot8A3V4japv 5FjeivXDPXeFnIW8wNft3jUC0KNkvf5T/afE2WcU1BSqj5ipK/tbcA3ZgDT1bqlnEnAM 5MRjNAnSyLfyL0JQnvQleUnRBM0DcmebDpsToMYZL2yruhmIzDKpR6KSlIL7g7aQflC7 UZlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786137523; x=1786742323; 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=iK39GoECH7eBfBcXOc+Hr3sqqq4Dev0XE+0hVdtjYDk=; b=ML2dbSNQuMG75Kz2rJDRGYt7QG0PtPqrFJHhCdDk9sNwE9Mj32IRceB8rEMWmsupGQ iCs9q2WkpPXXqIq8Il3ASlnjyKSuN434uNRtyppX6pusxZpKzomF03KQ3hCJqksOBbfW E52yNEpkF2KDR18/Retk1x9gDPpHDueWLobbOWarW+pCyuDD+2qK/6KzDmHtMSPewOmN hjJrU+auNBVmvqr/6TwkXP9vIirtmN7bi9BhSkQH5cbCmoO2q9L8sN2nvEhVZdr/rE4N YSP9j8p8y0l5qfrohXZjzLkwgpldoNNmZrYGx2wqGMxP3AQT+ymMVBXAR99X7EYPxZRP 7KSw== X-Forwarded-Encrypted: i=1; AHgh+RqNw4KuewmUaQAFD+eVUKjvrTOlCFqRwrlGXx4Igx14EyGjXUuH5J+p+J2ve4jzzjN4n4z4C3b0UlVtymY=@vger.kernel.org X-Gm-Message-State: AOJu0YxMv5/D0UnXgcEmitxk29PGZ3/Ie89vjawf1lxJaVDW+urqyaDs K8+wefOGqm4i5obs8f/+YI9qHMpU8dL3UcB69NemL8aSaDxStDxmEAgTLuvYiD3qp8I= X-Gm-Gg: AR+sD12IPvu7HiFeuhrcNgc0+6AC4nJCPiYdJK6pzIlP9677Vyd1fTMMj1PlaJ0h80h RFxrnOOcBxiimcYX+1aGfJkbsMbUXDsXfelFNcRvT1/qYnHcsJKmoegI5penTW2NKbZNGPa96gm yQizmJNI5CErmrvxyvo7BH1j43EYsc6LeIIS9t2WxedsNV8+3y3m7kitBQM0wdJB7TovPDWk2zh 0YU7Q2obqDIJWRwlLHdOVgY97QOo3SoKPBZxtN7o7fbvbXh3wIpge1cYb0obyA0SR/RUfCgib5W +xHufdk1r5bLy4AfXApvwdnMRQjHrSIMf2l/2gim0P5a0cKal13uRc1A1iRO3b8r9HksB1hymw+ W4JFFOChdCwgTKIaCozatY64A09gOHHv1UOM7nIKhB1LS4hnd70FRgBLvoq9kccxsN5pptMqSGG +wi0TyK/saR50NYHjfCGkzwE2dnSRjaC4t5014xI/EyiY86kt4Qb70HNnO55Ln++D8fg4q+T6g9 BOjrbZRqV+lrWfSldUjkuzjB/W91UEC4vPq X-Received: by 2002:a05:6830:3913:b0:7e6:d0ad:5254 with SMTP id 46e09a7af769-7f1e5d8da15mr19311167a34.8.1786137523090; Fri, 07 Aug 2026 14:18:43 -0700 (PDT) Received: from ?IPV6:2600:8803:e7e4:500:b714:88c:313d:dee2? ([2600:8803:e7e4:500:b714:88c:313d:dee2]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7f35b2edd41sm2073828a34.0.2026.08.07.14.18.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Aug 2026 14:18:41 -0700 (PDT) Message-ID: <05baac51-bb6c-4a2a-9587-4ae3e30aee21@baylibre.com> Date: Fri, 7 Aug 2026 16:18:40 -0500 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 v3 1/2] iio: adc: ti-ads112c14: add support for I2C CRC8 To: Andy Shevchenko Cc: Jonathan Cameron , =?UTF-8?Q?Nuno_S=C3=A1?= , Andy Shevchenko , Chris Hall , Patrick Edwards , Kurt Borja , Nguyen Minh Tien , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260727-iio-adc-ti-ads112c14-buffered-read-v3-0-cbbcaf030148@baylibre.com> <20260727-iio-adc-ti-ads112c14-buffered-read-v3-1-cbbcaf030148@baylibre.com> Content-Language: en-US From: David Lechner In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 8/6/26 8:08 PM, Andy Shevchenko wrote: > On Mon, Jul 27, 2026 at 09:09:50AM -0500, David Lechner (TI) wrote: >> Add support for I2C CRC8 to the TI ADS112C14 ADC driver. This verifies >> data integrity of all I2C transactions with the device. >> >> For now, it is always enabled, but it could be made optional in the >> future if needed (e.g. for higher-speed data acquisition). > > ... > >> +static int ads112c14_i2c_add_driver(struct i2c_driver *driver) >> +{ >> + crc8_populate_msb(ads112c14_crc8_table, ADS112C14_I2C_CRC8_POLYNOMIAL); >> + >> + return i2c_add_driver(driver); >> +} >> + >> static struct i2c_driver ads112c14_driver = { >> .driver = { >> .name = "ads112c14", >> @@ -1217,7 +1347,7 @@ static struct i2c_driver ads112c14_driver = { >> .probe = ads112c14_probe, >> .id_table = ads112c14_id, >> }; >> -module_i2c_driver(ads112c14_driver); >> +module_driver(ads112c14_driver, ads112c14_i2c_add_driver, i2c_del_driver); > > This is not needed if you call crc8_populate_msb() from the probe using > DO_ONCE_SLEEPABLE(). > Good idea, but this series got picked up already.