Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp557441imm; Thu, 6 Sep 2018 06:49:39 -0700 (PDT) X-Google-Smtp-Source: ANB0Vday10i3p3PBs+UuOBOG65lNWJEgzU6H+FWSEmFQwsG0HiaYiwJgyo4JI14MgKMSFX3rueMU X-Received: by 2002:a63:610:: with SMTP id 16-v6mr2772588pgg.96.1536241779160; Thu, 06 Sep 2018 06:49:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536241779; cv=none; d=google.com; s=arc-20160816; b=eFp5HY8BjFA8k0QxoqcbFkFOVXFoefXR1VJgxWhKcpRmziLurFYOd64TTonyRKq47R VPtescwff5QH7FUB9K0NdRym0XuUVi631EBRHUX2C1d4UJvhBwOrDZksjm1uVVchjjII TsjzUDXN0uG8xubtN05GaAXn8SaQ+q1pOFEOLHOWhoVFOrI/lJxBTxvWmwtWk1SkXPlP 3w5vRvaBnzjhULLZhFUHB1mXiAuRfet4ZQJxCOzTKcl0GLGKTbYizpHBTJaUqDPu1e/K 5Zlg5QYbQ2b+NGYHREQbh9VFSLS78KiRHe0b0biimSW0DvVr8g2izCw45kZU+j8J27BU T4+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=DGK+ZA5EULT78r//VySIqJQ0ZzXFXkaERb0BxDXRCNc=; b=j/yZVusGtQcFPo3z5csUmyevF7W3ZtvSZ0Vidt5S7YzSMqfSyhBCVAm94ydRkh9kXp EKI0dXkIPRzyUjGYV3dmpk32zZls8JW/DkiWvQ0TWZM8MIUXjLYSTVtXAdH0R/UHsuAh Ywd/XnNKwlf/m7F0rSH1FLLwHywhOlYQVkKJKjmRKSntn3bWmaAR3QZMBqFRLnlIBvo6 ZmLDY+VKvVsW67MjpA6pTQqVQ9mUNoZZOabINuQ6zzmy1fNas4B+sT4/P+5t9X7tzn+H n44dZ9Rv76W8orUzzFzRQ4bfiJL+qi9Rl3fSLBgrATubGYaoCoIStzZ2o+LGzDZg+qGl lPEg== 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 s3-v6si5400473plb.270.2018.09.06.06.49.23; Thu, 06 Sep 2018 06:49:39 -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 S1729990AbeIFSWZ (ORCPT + 99 others); Thu, 6 Sep 2018 14:22:25 -0400 Received: from esa5.microchip.iphmx.com ([216.71.150.166]:12842 "EHLO esa5.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729479AbeIFSWY (ORCPT ); Thu, 6 Sep 2018 14:22:24 -0400 X-IronPort-AV: E=Sophos;i="5.53,338,1531810800"; d="scan'208";a="17303232" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 06 Sep 2018 06:46:38 -0700 Received: from ibiza.rfo.atmel.com (10.10.76.4) by chn-sv-exch07.mchp-main.com (10.10.76.108) with Microsoft SMTP Server id 14.3.352.0; Thu, 6 Sep 2018 06:46:37 -0700 From: Ludovic Desroches To: , , CC: , , , , , , , "Ludovic Desroches" Subject: [PATCH v4 0/2] add ISO7816 support Date: Thu, 6 Sep 2018 15:42:12 +0200 Message-ID: <20180906134214.29031-1-ludovic.desroches@microchip.com> X-Mailer: git-send-email 2.12.2 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This patchset adds support for the ISO7816 standard. The USART devices in Microchip SoCs have an ISO7816 mode. It allows to let the USART managing the CLK and I/O signals of a smart card. Changes: - v4 - use the IP version number instead of the compatible string to set min and max values for fidi. - remove a useless macro for fidi. - v3 - add IOCTLs to parisc arch. - rework atmel_config_iso7816 according to the comments by Richard. - keep max iteration hard coded. Will see later if the user need to set this value. It may also concern the normal/inverse mode. - improve the checking of the value from the user space. - v2 - uart_get_iso7816_config: check there is an iso7816_config function. - use IOCTL macros to generate the IOCTL number. - check that reserved field is not used. - remove debug logs. - check that the iso7816_config is right before doing any action. - change the error from nack and max iteration status to a debug message. - remove patch 3 as it concerns both rs485 and iso7816 to think more. about the need of adding a lock or not. Nicolas Ferre (2): tty/serial_core: add ISO7816 infrastructure tty/serial: atmel: add ISO7816 support arch/alpha/include/uapi/asm/ioctls.h | 2 + arch/mips/include/uapi/asm/ioctls.h | 2 + arch/parisc/include/uapi/asm/ioctls.h | 2 + arch/powerpc/include/uapi/asm/ioctls.h | 2 + arch/sh/include/uapi/asm/ioctls.h | 2 + arch/sparc/include/uapi/asm/ioctls.h | 2 + arch/xtensa/include/uapi/asm/ioctls.h | 2 + drivers/tty/serial/atmel_serial.c | 190 +++++++++++++++++++++++++++++++-- drivers/tty/serial/atmel_serial.h | 3 +- drivers/tty/serial/serial_core.c | 60 +++++++++++ include/linux/serial_core.h | 3 + include/uapi/asm-generic/ioctls.h | 2 + include/uapi/linux/serial.h | 17 +++ 13 files changed, 277 insertions(+), 12 deletions(-) -- 2.12.2