From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 480CBC31E46 for ; Wed, 12 Jun 2019 08:15:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1EA632080A for ; Wed, 12 Jun 2019 08:15:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730630AbfFLIPt (ORCPT ); Wed, 12 Jun 2019 04:15:49 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:42749 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730629AbfFLIPt (ORCPT ); Wed, 12 Jun 2019 04:15:49 -0400 X-Originating-IP: 92.184.112.14 Received: from localhost (unknown [92.184.112.14]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 568C224005D; Wed, 12 Jun 2019 08:15:35 +0000 (UTC) Date: Wed, 12 Jun 2019 10:15:33 +0200 From: Alexandre Belloni To: Ladislav Michl Cc: linux-iio@vger.kernel.org, Eugen Hristev , Ludovic Desroches , Jonathan Cameron , Georg Ottinger , Maxime Ripard , Boris Brezillon Subject: Re: [RFC] iio: adc: at91: fix acking DRDY irq (again) Message-ID: <20190612081419.GM25472@piout.net> References: <20190611115603.GA11086@lenoch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190611115603.GA11086@lenoch> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On 11/06/2019 13:56:03+0200, Ladislav Michl wrote: > Driver also contains some code for TC triggers. How is that supposed to > work? [**] The very same manual states in chapter 39.5.5: > "If one of the TIOA outputs is selected, the corresponding Timer Counter > channel must be programmed in Waveform Mode." > There are two drivers touching TC: drivers/clocksource/timer-atmel-tcb.c > and drivers/pwm/pwm-atmel-tcb.c, they seem to conflict each other and They don't, they can work simultaneously, on different TCBs. I'm still planning to rework pwm-atmel-tcb to switch it to the proper binding. > none of them is anyhow related to ADC driver. Here it would seem > appropriate to have TC MFD driver and allocate timers for ADC, PWM and > clocksource from there. No, MFD is way too late for clocksource, this would break some platforms. However, there is definitively some timer framework that is missing to allow handling of timers that are not used as clocksource/clockevent devices. So indeed, there is a missing piece to make the TC trigger work. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com