From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752853AbaH2MI4 (ORCPT ); Fri, 29 Aug 2014 08:08:56 -0400 Received: from regular1.263xmail.com ([211.150.99.138]:47150 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751006AbaH2MIy (ORCPT ); Fri, 29 Aug 2014 08:08:54 -0400 X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-ABS-CHECKED: 4 X-KSVirus-check: 0 X-RL-SENDER: huangtao@rock-chips.com X-FST-TO: huangtao@rock-chips.com X-SENDER-IP: 127.0.0.1 X-LOGIN-NAME: huangtao@rock-chips.com X-UNIQUE-TAG: <766a18d078addef3bab3b6407c56332e> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 1 Message-ID: <54006D4C.2070404@rock-chips.com> Date: Fri, 29 Aug 2014 20:08:44 +0800 From: Huang Tao User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: "edubezval@gmail.com" , =?UTF-8?B?6LW15Luq5bOw?= CC: =?UTF-8?B?SGVpa29TdMO8Ym5lcg==?= , Arnd Bergmann , Caesar Wang , "rui.zhang" , "grant.likely" , robh+dt , linux-kernel , linux-pm , linux-arm-kernel , devicetree , linux-doc , =?UTF-8?B?6JSh5p6r?= , dianders , dtor , =?UTF-8?B?6ZKf5YuH5rGq?= , "addy.ke@rock-chips.com" , "dmitry.torokhov" , linux-iio , Jonathan Cameron Subject: Re: [PATCH v3 1/4] thermal: rockchip: add driver for thermal References: <1409187562-12370-1-git-send-email-caesar.wang@rock-chips.com> <2852853.mfRZfFVSev@wuerfel> <20140828143733.GA18084@developer> <3440260.edal29kzlR@diego> <2014082909531345696848@rock-chips.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear Eduardo Bezerra Valentin: 在 2014年08月29日 19:39, edubezval@gmail.com 写道: > Hello Zhao, > > On Thu, Aug 28, 2014 at 9:54 PM, 赵仪峰 wrote: >> Hi Heiko, >> >> The TS-ADC on RK3288 has two component, a tsadc and a tsadc controller. >> The tsadc controller is similar like the thermal manager unit on other SOCs. >> We followed the naming of 3066, but not named as the Thermal Manager. >> >> Moreover,there is only one set of apb registers to access the tsadc >> controller,and the tsadc is controlled by the tsadc controller,could not >> access directly. If we write a general tsadc driver by accessed tsadc >> controller registers, and it hardly to write a driver for the tsadc >> controller. > As suggested by Arnd, you can use the generic driver as interface > between thermal framework and IIO layer. The driver you are going to > write to your ADC is going to be in the IIO subsystem. The only > difference is that the generic driver would work for any ADC driver in > the IIO subsystem. > https://lkml.org/lkml/2014/2/5/810 > > In fact, there is already a generic driver. We just need to get it up > to date. I see some testing has been already done, and results sound > promising. This iio_thermal driver only support get temperature from the ADC IIO channel. It dose not support any advanced feature such as configure the temperature when system should be reset. So if we adapt it, we will access the register form both TSADC IIO driver and thermal driver. I don't thank this is a good ideal. In fact, we should ignore the "ADC" stuff. This sensor use ADC internal, but it is transparent to software, especially in automatic mode. > >> So, I do not agree to write a generic adc driver for the rk3288-tsadc. >> >> ________________________________ >> Yifeng Zhao >> >> From mboxrd@z Thu Jan 1 00:00:00 1970 From: Huang Tao Subject: Re: [PATCH v3 1/4] thermal: rockchip: add driver for thermal Date: Fri, 29 Aug 2014 20:08:44 +0800 Message-ID: <54006D4C.2070404@rock-chips.com> References: <1409187562-12370-1-git-send-email-caesar.wang@rock-chips.com> <2852853.mfRZfFVSev@wuerfel> <20140828143733.GA18084@developer> <3440260.edal29kzlR@diego> <2014082909531345696848@rock-chips.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: "edubezval-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" , =?UTF-8?B?6LW15Luq5bOw?= Cc: =?UTF-8?B?SGVpa29TdMO8Ym5lcg==?= , Arnd Bergmann , Caesar Wang , "rui.zhang" , "grant.likely" , robh+dt , linux-kernel , linux-pm , linux-arm-kernel , devicetree , linux-doc , =?UTF-8?B?6JSh5p6r?= , dianders , dtor , =?UTF-8?B?6ZKf5YuH5rGq?= , "addy.ke-TNX95d0MmH7DzftRWevZcw@public.gmane.org" , "dmitry.torokhov" , linux-iio , Jonathan Cameron List-Id: devicetree@vger.kernel.org Dear Eduardo Bezerra Valentin: =E5=9C=A8 2014=E5=B9=B408=E6=9C=8829=E6=97=A5 19:39, edubezval-Re5JQEeQqe8@public.gmane.org= m =E5=86=99=E9=81=93: > Hello Zhao, > > On Thu, Aug 28, 2014 at 9:54 PM, =E8=B5=B5=E4=BB=AA=E5=B3=B0 wrote: >> Hi Heiko=EF=BC=8C >> >> The TS-ADC on RK3288 has two component, a tsadc and a tsadc contr= oller. >> The tsadc controller is similar like the thermal manager unit on oth= er SOCs. >> We followed the naming of 3066, but not named as the Thermal Manager= =2E >> >> Moreover,there is only one set of apb registers to access the tsa= dc >> controller,and the tsadc is controlled by the tsadc controller,could= not >> access directly. If we write a general tsadc driver by accessed tsad= c >> controller registers, and it hardly to write a driver for the tsadc >> controller. > As suggested by Arnd, you can use the generic driver as interface > between thermal framework and IIO layer. The driver you are going to > write to your ADC is going to be in the IIO subsystem. The only > difference is that the generic driver would work for any ADC driver i= n > the IIO subsystem. > https://lkml.org/lkml/2014/2/5/810 > > In fact, there is already a generic driver. We just need to get it up > to date. I see some testing has been already done, and results sound > promising. This iio_thermal driver only support get temperature from the ADC IIO channel. It dose not support any advanced feature such as configure the temperature when system should be reset. So if we adapt it, we will access the register form both TSADC IIO driver and thermal driver. I don't thank this is a good ideal. In fact, we should ignore the "ADC" stuff. This sensor use ADC internal= , but it is transparent to software, especially in automatic mode. > >> So, I do not agree to write a generic adc driver for the rk3288-t= sadc. >> >> ________________________________ >> Yifeng Zhao >> >> -- To unsubscribe from this list: send the line "unsubscribe devicetree" i= n the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: huangtao@rock-chips.com (Huang Tao) Date: Fri, 29 Aug 2014 20:08:44 +0800 Subject: [PATCH v3 1/4] thermal: rockchip: add driver for thermal In-Reply-To: References: <1409187562-12370-1-git-send-email-caesar.wang@rock-chips.com> <2852853.mfRZfFVSev@wuerfel> <20140828143733.GA18084@developer> <3440260.edal29kzlR@diego> <2014082909531345696848@rock-chips.com> Message-ID: <54006D4C.2070404@rock-chips.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Dear Eduardo Bezerra Valentin: ? 2014?08?29? 19:39, edubezval at gmail.com ??: > Hello Zhao, > > On Thu, Aug 28, 2014 at 9:54 PM, ??? wrote: >> Hi Heiko? >> >> The TS-ADC on RK3288 has two component, a tsadc and a tsadc controller. >> The tsadc controller is similar like the thermal manager unit on other SOCs. >> We followed the naming of 3066, but not named as the Thermal Manager. >> >> Moreover,there is only one set of apb registers to access the tsadc >> controller,and the tsadc is controlled by the tsadc controller,could not >> access directly. If we write a general tsadc driver by accessed tsadc >> controller registers, and it hardly to write a driver for the tsadc >> controller. > As suggested by Arnd, you can use the generic driver as interface > between thermal framework and IIO layer. The driver you are going to > write to your ADC is going to be in the IIO subsystem. The only > difference is that the generic driver would work for any ADC driver in > the IIO subsystem. > https://lkml.org/lkml/2014/2/5/810 > > In fact, there is already a generic driver. We just need to get it up > to date. I see some testing has been already done, and results sound > promising. This iio_thermal driver only support get temperature from the ADC IIO channel. It dose not support any advanced feature such as configure the temperature when system should be reset. So if we adapt it, we will access the register form both TSADC IIO driver and thermal driver. I don't thank this is a good ideal. In fact, we should ignore the "ADC" stuff. This sensor use ADC internal, but it is transparent to software, especially in automatic mode. > >> So, I do not agree to write a generic adc driver for the rk3288-tsadc. >> >> ________________________________ >> Yifeng Zhao >> >>