Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2239522rdb; Mon, 20 Nov 2023 06:06:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IHEnUf0vYtnAJtv295bh63gEnHziAsrnamsB3IUbMYCXRDk5niRadDbTR5OC+LeSVMMIb66 X-Received: by 2002:a17:903:4282:b0:1cb:dc81:379a with SMTP id ju2-20020a170903428200b001cbdc81379amr5266186plb.53.1700489196657; Mon, 20 Nov 2023 06:06:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700489196; cv=none; d=google.com; s=arc-20160816; b=wXktu1ZQLA8dsCTuN5t+ixGAg+94RdAyo7RX7tIYIoLkUVSDn8LK9x0Ekx7CYgm308 qUQvdcTF/qqzhSYIY9rzDN2Bzo3wqx7hDh/2YviO2uxdJUDxRMAKrS4+VbFkrS7kpkY6 1gVR1ChSSgOtk1Iy3vgmoM6qESkGjksKrQ+wLwqg79TyjAySVP3fVWShLveiqAH1Xcfl d+ntHZ/UcJc4XBdQH01tU/qBXIvsshfDJlcKTUOc+I3Jv93U7tkYoANX4m2rkqHfjxaY eXEcfw9th3lgc4iWe3i6+p2/OEdI5kAErM97z7p9iIfGOWSrTzriOhUeISbCxmDWlYIl /qag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:content-language:references:cc:to:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=CBRhAg9oeeIt14xtcuewTxfszmZOswydLjQjk1Y0cQ0=; fh=z0O3AyAgqrtMRyHLhRrJ35fDFPxE8f+qpeXVXkee4Ss=; b=yy3LZOCo8vHynp5o8kKXD4BanxrjKj4Wr4n0pLPkU/k1F+oZU7x6j8axS4zuFuLxu0 lRpQVQlRAd4a5FEKVuK3JuddnsLrADavcT2rE0Ov39VNGMseR4IGXw2zPqqyElsGp3uM ZIypladln82W2KSewFpC62k6sJtL6AHIo/8uB+H78rWNyC+kOzdGMfTr+ILAvpcfauB0 60ji1FyxFrOXKqcAN26HTbwsm6LvHD/hIGbNLQlo8hzRGPlF4AVta8NEDvbegg36+yLv GxjM8LI3NtZq8GI8L1foKNQ98O/Q21nP3bcXss9Cqi5Rf8xdnROhqqleUGS9hWCa21Kh RVsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="I/4CTUUX"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id x6-20020a636306000000b00564929df8besi8307563pgb.568.2023.11.20.06.06.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 06:06:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="I/4CTUUX"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C562A801C1A4; Mon, 20 Nov 2023 06:05:06 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233600AbjKTOE7 (ORCPT + 99 others); Mon, 20 Nov 2023 09:04:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233730AbjKTOEa (ORCPT ); Mon, 20 Nov 2023 09:04:30 -0500 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C746F3 for ; Mon, 20 Nov 2023 06:04:13 -0800 (PST) Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-32fadd4ad09so3320617f8f.1 for ; Mon, 20 Nov 2023 06:04:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700489052; x=1701093852; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=CBRhAg9oeeIt14xtcuewTxfszmZOswydLjQjk1Y0cQ0=; b=I/4CTUUXrA0t9Eu8PJBURBh0l/+HDiSHr3oIf8GfOmGf5pHjApCNqO8zGGtXf4gQlb 6mjJF1VXKY71hyAdCpkfYDFONhEQA+xIZg/P224NwG7HvHzroRrFfkH8d+XCok91F+Vp 8OeSxD0a9D6LTw7r01eldr/2BhcoU8CNCpH18xD2M92jh+NAi8GvKZbC6WPWtov9LTgW Bl07FgUMz8nZPoPdP6I1/j/pzmWWRGjUfyrx1eviOkhTOmagGRGv0bVHheyD7cZOaMwl kEeKCrHMiYA3pXBrUlcFQBTyM2r+pdJPdFlsZ3B7YK9a5Lvzptgqtqi4bC/HmAUGDXs+ hiJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700489052; x=1701093852; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=CBRhAg9oeeIt14xtcuewTxfszmZOswydLjQjk1Y0cQ0=; b=oPBIS3IknKKgrn6UseIruUtxpB9KmFnprWZVrvjJUIZF2KvFthEM5zveA2l3O29S0J JSmRP0Qd1iNFgMt/2pkgSaSKl8CpJoZnw4LeIu7ZlWGZDF7M1CZykDbocnPSRxw3kWQf dNW4QoYNsi3PxlsZd1PAOiq6nEgz37lFl6cM1TiG4v/fNfaRUEyvEWIpR0P1UKLgxrza 04Z1NAD9cxDjPWBJO4NssESfk0InBl/wT9aUafsZJZbEp5IIVXHLxpf8ghIZrqwnyKxr pNVaSkBF8LYLF8cX/35bn0orz+krPm6roUb2+mfB2yaizbZ/6vl/bxPaEDrzvjNeJiCq eodg== X-Gm-Message-State: AOJu0YzFWww77/6TSzDcWEfGc+/16XoIOli+wsyYzc0ilwelORM4pTxB BA112fee86vk7n70jRMQVrDBuw== X-Received: by 2002:a5d:46c9:0:b0:32f:acb6:7f6a with SMTP id g9-20020a5d46c9000000b0032facb67f6amr4130963wrs.64.1700489051665; Mon, 20 Nov 2023 06:04:11 -0800 (PST) Received: from [192.168.1.20] ([178.197.222.11]) by smtp.gmail.com with ESMTPSA id m10-20020a5d4a0a000000b00331702ab6acsm8620379wrq.7.2023.11.20.06.04.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Nov 2023 06:04:10 -0800 (PST) Message-ID: <8aa11758-5eee-427b-adcb-c3578a521daf@linaro.org> Date: Mon, 20 Nov 2023 15:04:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/2] dt-bindings: iio: pressure: add honeywell,hsc030 To: Petre Rodan Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Conor Dooley , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , linux-kernel-mentees@lists.linuxfoundation.org, Jonathan Cameron References: <20231117164232.8474-1-petre.rodan@subdimension.ro> <20231117192305.17612-1-petre.rodan@subdimension.ro> <5b2e4b05-9408-48ea-92ac-15883e102013@linaro.org> Content-Language: en-US From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlow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cVUqa+XdUEciwG/SgNyxBZepj41oVq FPSVE+Ni2tNrW/e16b8mgXNngHSnbsr6pAIXZH3qFW+4TKPMGZ2rZ6zITrMip+12jgw4mGjy 5y06JZvA02rZT2k9aa7i9dUUFggaanI09jNGbRA/ABEBAAHCwXwEGAEKACYCGwwWIQSb0H4O DFH41ZZ3t1Qbk0N9O0FimwUCYDzvagUJFF+UtgAKCRAbk0N9O0Fim9JzD/0auoGtUu4mgnna oEEpQEOjgT7l9TVuO3Qa/SeH+E0m55y5Fjpp6ZToc481za3xAcxK/BtIX5Wn1mQ6+szfrJQ6 59y2io437BeuWIRjQniSxHz1kgtFECiV30yHRgOoQlzUea7FgsnuWdstgfWi6LxstswEzxLZ Sj1EqpXYZE4uLjh6dW292sO+j4LEqPYr53hyV4I2LPmptPE9Rb9yCTAbSUlzgjiyyjuXhcwM qf3lzsm02y7Ooq+ERVKiJzlvLd9tSe4jRx6Z6LMXhB21fa5DGs/tHAcUF35hSJrvMJzPT/+u /oVmYDFZkbLlqs2XpWaVCo2jv8+iHxZZ9FL7F6AHFzqEFdqGnJQqmEApiRqH6b4jRBOgJ+cY qc+rJggwMQcJL9F+oDm3wX47nr6jIsEB5ZftdybIzpMZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 20 Nov 2023 06:05:06 -0800 (PST) On 20/11/2023 14:42, Petre Rodan wrote: >>> +properties: >>> + compatible: >>> + enum: >>> + - honeywell,hsc >> >> Way too generic > > I'm new to this, please excuse my ignorance. > my driver covers all Honeywell pressure sensors under the "TruStability board mount HSC/SSC" moniker. We talk here about bindings, not driver. For the driver you can use whatever name is approved by reviewers of your driver. > that is why my intention was to provide a rather generic name for the driver itself. > are you afraid that they will come up with a different device that they will call "hsc" in the future? > in this case honeywell,trustability-hsc would be fine? > > as I see you prefer to target a particular chip, but I am a bit afraid that the end-user will be confused by needing to set up something like > > pressure@28 { > compatible = "honeywell,hsc030pa"; The compatible should be specific, thus for example match exact model number. If you can guarantee that all devices from given family are the same in respect of programming model and hardware requirements (e.g. supplies), then you could go with family name. However such guarantees are rarely given. Therefore for mprls0025pa I agreed for using one specific model for entire family. https://lore.kernel.org/all/d577bc44-780f-f25d-29c6-ed1d353b540c@linaro.org/ > reg = <0x28>; > honeywell,transfer-function = <0>; > honeywell,pressure-range = "250MD"; > }; > > ie. specifying "hsc030pa" as driver while his chip is not in the 030PA range, but 250MD. > > so do you prefer > honeywell,trustability-hsc OR > honeywell,hsc030pa I think the latter, just like we did for mprls0025pa. How many devices do you have there? > >>> + honeywell,range_str: >> >> No underscores in property names. >> >> "str" is redundant. Instead say what is it, because "range" is way too >> vague. > > will rename to honeywell,pressure-range if that is ok with you. Yes > >>> + description: | >>> + Five character string that defines "pressure range, unit and type" >>> + as part of the device nomenclature. In the unlikely case of a custom >>> + chip, set to "NA" and provide honeywell,pmin-pascal honeywell,pmax-pascal >>> + enum: [001BA, 1.6BA, 2.5BA, 004BA, 006BA, 010BA, 1.6MD, 2.5MD, 004MD, >>> + 006MD, 010MD, 016MD, 025MD, 040MD, 060MD, 100MD, 160MD, 250MD, >>> + 400MD, 600MD, 001BD, 1.6BD, 2.5BD, 004BD, 2.5MG, 004MG, 006MG, >>> + 010MG, 016MG, 025MG, 040MG, 060MG, 100MG, 160MG, 250MG, 400MG, >>> + 600MG, 001BG, 1.6BG, 2.5BG, 004BG, 006BG, 010BG, 100KA, 160KA, >>> + 250KA, 400KA, 600KA, 001GA, 160LD, 250LD, 400LD, 600LD, 001KD, >>> + 1.6KD, 2.5KD, 004KD, 006KD, 010KD, 016KD, 025KD, 040KD, 060KD, >>> + 100KD, 160KD, 250KD, 400KD, 250LG, 400LG, 600LG, 001KG, 1.6KG, >>> + 2.5KG, 004KG, 006KG, 010KG, 016KG, 025KG, 040KG, 060KG, 100KG, >>> + 160KG, 250KG, 400KG, 600KG, 001GG, 015PA, 030PA, 060PA, 100PA, >>> + 150PA, 0.5ND, 001ND, 002ND, 004ND, 005ND, 010ND, 020ND, 030ND, >>> + 001PD, 005PD, 015PD, 030PD, 060PD, 001NG, 002NG, 004NG, 005NG, >>> + 010NG, 020NG, 030NG, 001PG, 005PG, 015PG, 030PG, 060PG, 100PG, >>> + 150PG, NA] >>> + $ref: /schemas/types.yaml#/definitions/string >>> + >>> + honeywell,pmin-pascal: >>> + description: | >>> + Minimum pressure value the sensor can measure in pascal. >>> + To be specified only if honeywell,range_str is set to "NA". >>> + $ref: /schemas/types.yaml#/definitions/int32 >> >> That's uint32. Why do you need negative values? > > signed int32 is intentional. some chips have two physical input ports and measure a pressure differential in which case pmin is negative. > see either of the pdfs at page 14, table 8, column 2, row 7+ Then the best would be to change the type in other bindings to have int32 everywhere... but dtschema also requires unt32: https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml I think pressure can be negative (e.g. when device measures pressure in relation to atmospheric pressure), thus maybe we need to fix dtschema first. > >>> + honeywell,pmax-pascal: >>> + description: | >>> + Maximum pressure value the sensor can measure in pascal. >>> + To be specified only if honeywell,range_str is set to "NA". >>> + $ref: /schemas/types.yaml#/definitions/int32 >> >> Ditto > > well, since we saw pmin needs to be signed should we have pmax unsigned? I guess this could stay uint32, although it depends on final units for pascal. Best regards, Krzysztof