From patchwork Thu Sep 6 13:42:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ludovic Desroches X-Patchwork-Id: 10590643 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6768D14BD for ; Thu, 6 Sep 2018 13:47:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 452442AAB3 for ; Thu, 6 Sep 2018 13:47:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 388642AB48; Thu, 6 Sep 2018 13:47:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 03BE42AAB3 for ; Thu, 6 Sep 2018 13:47:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=M4V0yvN1BgMA7B+FOE/ihw7ufer/PaQCADvFq695eyA=; b=itgyKL3NldqNPZ a0GPWLB5BVJCzucKqeH3Hi0UPw/I4jm+9xJ48Wv2RlOevG/enimkFYYMpqBr6jyLNrh2+hvYjDnSF 8ewub0jBks3XEBcbUTBdJWA06DQiE+uHyWiwytnVH0FWFBetWJHM0nwDIKJ+43KNvD0AOrDJVVjmt VY9GU86ZahnTbfT/WDYK82LXg6nGMcQyEeycOddx4jhW5ICLiMwq48+h4UP4J3Jf8w8w5dUMLlI1v uSYpaMpEfIG7GZFSbOf9G2hycK2sGilbPVeXx3rH6jaBQnZAeWBBqJEKN8MmjqfPSmKaxXQtIV7oa 140e3j2MJQOISRlIIE8Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fxud6-0002M4-Qr; Thu, 06 Sep 2018 13:47:28 +0000 Received: from esa5.microchip.iphmx.com ([216.71.150.166]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fxucd-00025N-Nn for linux-arm-kernel@lists.infradead.org; Thu, 06 Sep 2018 13:47:01 +0000 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: , , 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180906_064659_933925_93CD73A6 X-CRM114-Status: GOOD ( 10.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alexandre.belloni@bootlin.com, arnd@arndb.de, richard.genoud@gmail.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, Ludovic Desroches , jslaby@suse.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-)