From patchwork Tue Aug 7 13:00:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ludovic Desroches X-Patchwork-Id: 10558685 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 33FA214E5 for ; Tue, 7 Aug 2018 13:05:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D4AB29C7F for ; Tue, 7 Aug 2018 13:05:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1127429D5E; Tue, 7 Aug 2018 13:05:18 +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 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 9AC6F29C7F for ; Tue, 7 Aug 2018 13:05:17 +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=k61nBc7Y2bvfFR0Kn++rbMD6sbqUrXAM1GLckKlsk+c=; b=qjHQiKSD2jp3Cc HJwRH/dDbJCec57haeZa9VjHm9L8lPqolIZR+A/klxeuM0ZjYl6gy5iTKIVdOL1n2EHhIt5rDaqts xqZszp30mjxkrD8VuSPBis6YdkwZC3FDs5FfOHZegs7R7o9S3/OReauqfSeda2Gdija5PCk4o9Nda 3vJMVOD8lbyh45kb538W0HTReE2r8bPCotFqO5rGJe5UAY+OngekzGRIK+yHk2ljpsuFiW7f8/fXC 3bdHvV0rJvY2rsOpQv9ZqiPkWFcqoIQYikF9RkACcKRfSBqCWRIyo/9vMMD7Z4wCG301ny/JofyYs 7CRFKjoMVcEcI1khNdRw==; 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 1fn1fm-0006Cr-Ak; Tue, 07 Aug 2018 13:05:14 +0000 Received: from esa1.microchip.iphmx.com ([68.232.147.91]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fn1fi-0004x9-1N for linux-arm-kernel@lists.infradead.org; Tue, 07 Aug 2018 13:05:12 +0000 X-IronPort-AV: E=Sophos;i="5.51,455,1526367600"; d="scan'208";a="18265779" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 07 Aug 2018 06:04:57 -0700 Received: from ibiza.rfo.atmel.com (10.10.76.4) by chn-sv-exch02.mchp-main.com (10.10.76.38) with Microsoft SMTP Server id 14.3.352.0; Tue, 7 Aug 2018 06:04:55 -0700 From: Ludovic Desroches To: , , Subject: [PATCH v3 0/2] add ISO7816 support Date: Tue, 7 Aug 2018 15:00:47 +0200 Message-ID: <20180807130049.5957-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-20180807_060510_194517_A4983274 X-CRM114-Status: GOOD ( 10.94 ) 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: - 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 | 211 ++++++++++++++++++++++++++++++--- drivers/tty/serial/atmel_serial.h | 6 +- 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, 297 insertions(+), 16 deletions(-)