Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp402206ybk; Wed, 20 May 2020 02:33:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyYX/F9ld2jLKKPpnGNFzxpuuiIxVs+ChDtYfClQx/xSOLbSqPFQhpL6YupGokmgpTMjmh X-Received: by 2002:a50:cdc8:: with SMTP id h8mr2570170edj.26.1589967219754; Wed, 20 May 2020 02:33:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589967219; cv=none; d=google.com; s=arc-20160816; b=aKvx6kAFIjzpYV6LCZ8RZJv9u6vzeaUKW1wT14lVN5P+WnSOP79JufGHErhgnPiNxi W6JIkLw6QUVXmNSLZdz1j0e3H8zYCt00R2yiR97nSiIobZQPkJPcoo2muF/palhyzGJR U3fR/O8a4l7L1JQPL5j87wdhA1i6Jy9DKysUio4ktB0gTVO/HSz3HjQ5G2fE+9aYP46O ySa4WtCJmU33xjy2OEBAJ289PufcR28dw4ii6W4otrwM5vcV4GK7xd/yfUwbuEy0G4Bi AblfmyXouFER7ov40omCnn6dbp5qHFMlApcqDexkbxDJU7CoWzLP7U+3EoxT0scT1Ntn yuuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=vnMYNrD5xFrqPZ12P+CUYTuQR/zTD6kL3bib8/4eAFA=; b=vWvWZIxMIMUAwbXkezogVR8f/Tyk2z6ae/b8ias2NbJ0zI4PDoSiNFKjFE93EPRFn2 e/8QSSX//f2e+GXTxhEt2KhO83msdNC7oCJNlU6hWjGS8cW71Kc9hDQ1EaqtgWGcI68l Mw/VYdabemZygwizUlmpu1JVbiG9F6LxL9W1YkqJNEeAG3nie+UoLJBj2aMvrgwWfRRU 5tpe3KkuuWDytH7sC226yBLkg1Jg0TrDtiRVYRAQz/vmCUQ96fri/wbgnM/smVwIGRBv etXk4eq4ER/Y3RuK2Nz0Sxjd0cUb7Xh+oxfNqb1AR4qOxozIzsZJPXagiFEsLj8H4yOf GNJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nVWCPKGt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w8si1468676eji.466.2020.05.20.02.33.17; Wed, 20 May 2020 02:33:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nVWCPKGt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726948AbgETJbF (ORCPT + 99 others); Wed, 20 May 2020 05:31:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726545AbgETJbE (ORCPT ); Wed, 20 May 2020 05:31:04 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F204C05BD43 for ; Wed, 20 May 2020 02:31:04 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id t8so2595064wmi.0 for ; Wed, 20 May 2020 02:31:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=vnMYNrD5xFrqPZ12P+CUYTuQR/zTD6kL3bib8/4eAFA=; b=nVWCPKGtDsfqcZpiCWP93jC50VzOjkoDTLJHO/l0sfwdq/yYogmFoEhraSXDbBFYE3 wKcBgirsp4/ZxSPX/9x9Qd3uP5i2daOEkdGL5tQoOINJACVZ+LWnepPZT+gWoTBxtraa dk2Pn6LRlufZs48w15o9mk3oLI/Q0HsZokX9jpG5fZPxATB8VX7bii5QUssKwrjdfPl4 pi1qdiuAJ+9h/Xg0xLnsHEL14wJDeoeECXTSj3vhyWBcHTGO1SBqRJguYnyvVSlsKjLK /UHL/ViMeC5qdHjmGJ9rAv7gHkiQIiL+KUkWEE6fwnqyQsF8bHpiW7qV+K+PJ7mDQIYk wf9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=vnMYNrD5xFrqPZ12P+CUYTuQR/zTD6kL3bib8/4eAFA=; b=IgNd9KPDqAw0yx73k3Mf8D1Olq7yNJkt3jtHIj0QRgIeqKAJb06soPaWcbUypHdp9n m6x7oXvXfoXNWyIO8mSGKMCvRTzjfYaMmQur2ToTkWgV+5yw4FHKbgEuPCTnRiIys72n gv6o1IjsbJ0VMyzLNip5qGYK4Xq95jATfU4zoCy0n/DG8titTZ2jgHpbSjQdPXEGpGdV pb4/Ajmdluc0c/gEC2B1CPS4529oEvx24j6+jkCdFzTnfp+2okAITUsebOTQBPf0JIpt zClIppH/KlYlB3CYr+igbvnM6dsieodGjwzFkwdbsHUamcel7VQJUGKO2objdyOYKrRl NeWw== X-Gm-Message-State: AOAM530XhI8cxULTFv9RuIxfBB4lnazLZLXix36Y3PCnbab+KOtzuHci BFzL3vTnkZyosohHscCHvJ2jGw== X-Received: by 2002:a1c:bd56:: with SMTP id n83mr1935210wmf.139.1589967063211; Wed, 20 May 2020 02:31:03 -0700 (PDT) Received: from dell ([95.149.164.102]) by smtp.gmail.com with ESMTPSA id n7sm2184521wro.94.2020.05.20.02.31.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2020 02:31:02 -0700 (PDT) Date: Wed, 20 May 2020 10:31:00 +0100 From: Lee Jones To: Tim Harvey Cc: Jean Delvare , Guenter Roeck , linux-hwmon@vger.kernel.org, Rob Herring , Frank Rowand , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Robert Jones Subject: Re: [PATCH 3/3] hwmon: add Gateworks System Controller support Message-ID: <20200520093100.GH271301@dell> References: <1589565428-28886-1-git-send-email-tharvey@gateworks.com> <1589565428-28886-4-git-send-email-tharvey@gateworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1589565428-28886-4-git-send-email-tharvey@gateworks.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 15 May 2020, Tim Harvey wrote: > The Gateworks System Controller has a hwmon sub-component that exposes > up to 16 ADC's, some of which are temperature sensors, others which are > voltage inputs. The ADC configuration (register mapping and name) is > configured via device-tree and varies board to board. > > Signed-off-by: Tim Harvey > Reviewed-by: Guenter Roeck > --- > v11: > - no change > > v10: > - no change > > v9: > - use exported gsc_{read,write} > - added Reviewed-by: Guenter Roeck > > v8: > - move regmap init to hwmon > > v7: > - fix whitespace in Kconfig > - remove unnecessary device pointer in private data > - change divider from mili-ohms to ohms > - move fan base property to reg > > v6: > - fix size of info field > - improve pwm output control documentation > - include unit suffix in divider and offset > - change subnode name to gsc-adc > - change to fan subnode > - fix voltage offset > > v5: > - fix various checkpatch issues > - correct gsc-hwmon.rst in MAINTAINERS > - encorporate Gunter's feedback: > - switch to SENSOR_DEVICE_ATTR_{RW,RO} > - use tmp value to avoid excessive pointer deference > - simplify shift operation > - scale voffset once > - simplify is_visible function > - remove empty line at end of file > > v4: > - adjust for uV offset from device-tree > - remove unnecessary optional write function > - remove register range check > - change dev_err prints to use gsc dev > - hard-code resolution/scaling for raw adcs > - describe units of ADC resolution > - move to using pwm_auto_point_{pwm,temp} for FAN PWM > - ensure space before/after operators > - remove unnecessary parens > - remove more debugging > - add default case and comment for type_voltage > - remove unnecessary index bounds checks for channel > - remove unnecessary clearing of struct fields > - added Documentation/hwmon/gsc-hwmon.rst > > v3: > - add voltage_raw input type and supporting fields > - add channel validation to is_visible function > - remove unnecessary channel validation from read/write functions > > v2: > - change license comment style > - remove DEBUG > - simplify regmap_bulk_read err check > - remove break after returns in switch statement > - fix fan setpoint buffer address > - remove unnecessary parens > - consistently use struct device *dev pointer > - change license/comment block > - add validation for hwmon child node props > - move parsing of of to own function > - use strlcpy to ensure null termination > - fix static array sizes and removed unnecessary initializers > - dynamically allocate channels > - fix fan input label > - support platform data > - fixed whitespace issues > --- > Documentation/hwmon/gsc-hwmon.rst | 53 +++++ > Documentation/hwmon/index.rst | 1 + > MAINTAINERS | 3 + > drivers/hwmon/Kconfig | 9 + > drivers/hwmon/Makefile | 1 + > drivers/hwmon/gsc-hwmon.c | 390 ++++++++++++++++++++++++++++++++ > include/linux/platform_data/gsc_hwmon.h | 44 ++++ > 7 files changed, 501 insertions(+) > create mode 100644 Documentation/hwmon/gsc-hwmon.rst > create mode 100644 drivers/hwmon/gsc-hwmon.c > create mode 100644 include/linux/platform_data/gsc_hwmon.h Applied, thanks. -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog