Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1926172imm; Thu, 9 Aug 2018 04:33:22 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzxyjzEyrtTXB/cyrWeHfqeimTS50VbdfTHwp3HGZiXOlyxZRBjtAYpXrjCT6u4pOTFW9yR X-Received: by 2002:a63:1e66:: with SMTP id p38-v6mr1798101pgm.376.1533814402522; Thu, 09 Aug 2018 04:33:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533814402; cv=none; d=google.com; s=arc-20160816; b=f9P3k8mch1bWOLLJISnXvRjQLEQkId1dABH8BY+8cuOAED2qGJEK9T3VsjtW9ly1On CKjPJb+QO07E9UGrYiO2Q4tMwJx2qBVVOlC297g1KTLg3MazUzhVbCac9+7+9DFAfoYQ Z9Epxf3DQ5b8bXlYjgjLkz+nUslt/Jtqr+HJGuCo2AzgJVsEiGmWNub7NncvDW2ekZLY 9VnLCnLsb8dkd6aq2Fw/IgzJV6+rYZ6Ylr1+2L1ph08Yg3FvrfMvl+a8Y4G07SzP0UE1 Knxq53kwlOHJ+YZCTr8vV7FSKrEXh8MsQht4H3Z2gX6cQHIK5t/mI5ZPLkN/42snlH1E Z9AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:arc-authentication-results; bh=4ar7Sb3mmYQeDiuh6BHMWchLlFuGiFgCVRTwyjTDCrQ=; b=ZtauLewsPMDdzdN3WuZyJ+fVqLi5lokBeuedxdWot0a6+OT4ejwazM7JAOxk6sRbl9 y1v5r/OrLnIdLndETMdkxzC+lz/n9yMxidXsYIJx5JGh5Gkh64CVozXqw7id2WOUdZIS oe/7J4qyaRRkJ8LFwzZaZPd15LRUWMJEsTJb39o0rjdcVb6wg4acCJnAg9/Mi2mBBkvt f47R+tFJ47xcEMwIOACyRR7lPr8k9mIk6OIDnvN1W6Vyb1OqzihREx0sXWABYrrvYzYo Cr+oNZscHVPvWwH95UbLsSXT3ahqa3tPUUinDZD/vXabyP0v3f/UQaaztBzyIbLFHHzY +KmQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t188-v6si6450310pfd.148.2018.08.09.04.33.07; Thu, 09 Aug 2018 04:33:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731063AbeHIN4M (ORCPT + 99 others); Thu, 9 Aug 2018 09:56:12 -0400 Received: from esa6.microchip.iphmx.com ([216.71.154.253]:46114 "EHLO esa6.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730573AbeHIN4M (ORCPT ); Thu, 9 Aug 2018 09:56:12 -0400 X-IronPort-AV: E=Sophos;i="5.53,214,1531810800"; d="scan'208";a="14947484" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 09 Aug 2018 04:31:45 -0700 Received: from localhost (10.10.76.4) by chn-sv-exch02.mchp-main.com (10.10.76.38) with Microsoft SMTP Server id 14.3.352.0; Thu, 9 Aug 2018 04:31:44 -0700 Date: Thu, 9 Aug 2018 13:30:35 +0200 From: Ludovic Desroches To: Richard Genoud CC: , , , , , , , Subject: Re: [PATCH v3 2/2] tty/serial: atmel: add ISO7816 support Message-ID: <20180809113035.kftvdalca7zsf4ly@M43218.corp.atmel.com> Mail-Followup-To: Richard Genoud , linux-serial@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, alexandre.belloni@bootlin.com, arnd@arndb.de, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, jslaby@suse.com References: <20180807130049.5957-1-ludovic.desroches@microchip.com> <20180807130049.5957-3-ludovic.desroches@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Richard, On Thu, Aug 09, 2018 at 10:47:17AM +0200, Richard Genoud wrote: > Hi ! > > On 07/08/2018 15:00, Ludovic Desroches wrote: > > From: Nicolas Ferre > > > > When mode is set in atmel_config_iso7816() we backup last RS232 mode > > for coming back to this mode if requested. > > Also allow setup of T=0 and T=1 parameter and basic support in set_termios > > function as well. > > > > Signed-off-by: Nicolas Ferre > > [ludovic.desroches@microchip.com: rebase, add check on fidi ratio, checkpatch fixes] > > Signed-off-by: Ludovic Desroches > > --- > > drivers/tty/serial/atmel_serial.c | 211 +++++++++++++++++++++++++++++++++++--- > > drivers/tty/serial/atmel_serial.h | 6 +- > > 2 files changed, 201 insertions(+), 16 deletions(-) > > > > diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c > > index 8e4428725848..4a7ec44b0ace 100644 > > --- a/drivers/tty/serial/atmel_serial.c > > +++ b/drivers/tty/serial/atmel_serial.c [...] > > #if defined(CONFIG_OF) > > +static struct atmel_uart_pdata at91rm9200_pdata = { > > + .fidi_min = 1, > > + .fidi_max = 2047, > > +}; > > + > > +static struct atmel_uart_pdata at91sam9260_pdata = { > > + .fidi_min = 1, > > + .fidi_max = 2047, > > +}; > > + > > +static struct atmel_uart_pdata sama5d3_pdata = { > > + .fidi_min = 3, > > + .fidi_max = 65535, > Are you sure this is for sama5d3 ? > From the datasheets I have, 65535 is for sama5d4/sama5d2 I checked it and I missed it. What a pity... In fact, it's a bit more tricky since the min value for d3 is 3 and no longer 1. > And also, you'll have to s/atmel,at91sam9260-usart/atmel,sama5d2-usart/g > in sama5d{2,4}.dtsi > Yes, I planed to send it later but I can add those patches within this set of patches. > But I wonder if it could be detected via ATMEL_US_VERSION instead ? > I have not checked, I tend to prefer the compatible string for this kind of thing. But as we already use the version number, I can investigate this solution if it's the one you prefer. Regards Ludovic