From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757914AbcC2TOs (ORCPT ); Tue, 29 Mar 2016 15:14:48 -0400 Received: from argos.tuxed.org ([176.9.87.227]:57905 "EHLO argos.tuxed.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757718AbcC2TOm (ORCPT ); Tue, 29 Mar 2016 15:14:42 -0400 From: Alexander Koch To: Jean Delvare Cc: Guenter Roeck , lm-sensors@lm-sensors.org, linux-kernel@vger.kernel.org, Michael Hornung , Alexander Koch Subject: [PATCH 0/2] hwmon: adc128d818: Support operation mode 1 Date: Tue, 29 Mar 2016 21:03:37 +0200 Message-Id: <1459278219-5573-1-git-send-email-mail@alexanderkoch.net> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ADC128D818 offers four different chip operation modes which vary in the number and measurement types of the available input signals (see datasheet sec. 8.4.1). The current version of the driver only supports the default chip operation mode (mode 0), providing seven analog values and a temperature reading. This patch series adds support for operation mode 1 (eight analog inputs but no temperature), selectable through the device tree attribute 'mode': adc1: adc128d818@1d { compatible = "ti,adc128d818"; reg = <0x1d>; mode = /bits/ 8 <1>; }; The changes are transparent as 'mode' defaults to mode 0 which yields the previous behaviour. Code has been tested on real hardware using an evaluation board. Alexander Koch (2): hwmon: adc128d818: Implement chip mode selection hwmon: adc128d818: Implement operation mode 1 drivers/hwmon/adc128d818.c | 113 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 95 insertions(+), 18 deletions(-) -- 2.7.4