Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3741656imm; Mon, 30 Jul 2018 02:37:06 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdnezOhzL2gH6IzRW+ETpwNc+qDNpFaYtg9TGyJ4Am8KerWnfLozIfM/C4i5kx4BhHfyMjh X-Received: by 2002:a17:902:280b:: with SMTP id e11-v6mr15716782plb.298.1532943426181; Mon, 30 Jul 2018 02:37:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532943426; cv=none; d=google.com; s=arc-20160816; b=gWG9neMRrwpRJIBRoKRVQEiH13XvSMrB1dS3o03Rvlh9GpCcEoD8W+vK9w/f80abs8 eLpWU0AfabFwKjv6CdbOsKR8ZdlYrlKElAvwXjmSrezBOmYjkMSguAk9kIJE3UC37h7Q Rv4lb9OCNJA7YesC12n/8QbB3hD13yUVPFGhsMPYApAt/A4ZoVYcW2WGrdkkPyttvf4Y QzytEbCPIM7bmvy6GfyDO27D9BQVs4Y5DS6dceuUmj+ee7Bdf3y5KZ8mGu9if5ZTeEjZ kwrntUXL7s7DEn34Df46FG+ASkmuAjwdc9S86gs3FJbD1kwpFfTkcux1Q4L17oQXHuNk Uwjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=eIZDcKeWlqlOP5F1R7RQmd7hNyZd66LKDvSwou+MbCg=; b=CX/ZSjNv7Ejhohab9YcIOv0CzJ8TZGXaygeRwB9PIT2KBj2MfFOxRriyPYaI1sEet/ s93tF+XnbwfE50SmU4ecIJ0YAR1wAB14pdNqxSlv/LAKXs8o+iMDRSZp7mQWGuQZ7tBP uzo+QYW4uSeghM0FeGDskPNtssD3/UXqKMBccBY/4PXETpYdwavAR+D5FWk7cT0v2Amz OxzRTNPYjSic+WTd9YVlIfn6UlnXzq183c2amXrQ1ObgqyUOYFIPPpfEulPyAd7N9O1Z jxD74e4I3x0vvm9E6+El0osJE7KcoJP/DsJfsVKhmtYKEGmZeHm5o74rxULF07I2Cfiw vBDQ== 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b6-v6si9882262pgm.644.2018.07.30.02.36.52; Mon, 30 Jul 2018 02:37:06 -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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727119AbeG3LIj (ORCPT + 99 others); Mon, 30 Jul 2018 07:08:39 -0400 Received: from 212.199.177.27.static.012.net.il ([212.199.177.27]:51573 "EHLO herzl.nuvoton.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726703AbeG3LIi (ORCPT ); Mon, 30 Jul 2018 07:08:38 -0400 Received: from taln60.nuvoton.co.il (ntil-fw [212.199.177.25]) by herzl.nuvoton.co.il (8.13.8/8.13.8) with ESMTP id w6U94LgQ004897; Mon, 30 Jul 2018 12:04:21 +0300 Received: by taln60.nuvoton.co.il (Postfix, from userid 10070) id 0BFA363129; Mon, 30 Jul 2018 12:34:21 +0300 (IDT) From: Tomer Maimon To: linus.walleij@linaro.org Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Tomer Maimon Subject: [PATCH v1 0/1] gpio: mmio: add get_set inverted direction io support Date: Mon, 30 Jul 2018 12:34:17 +0300 Message-Id: <20180730093418.124648-1-tmaimon77@gmail.com> X-Mailer: git-send-email 2.14.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When bgpio direction register use dirin and setting BGPIOF_READ_OUTPUT_REG_SET flag, the get_set I/O functions reading the inverted set register of each direction, it means: when direction=in the get_set function read set register. when direction=out the get_set function read dat register. but is should be inverted. conversion about it with Linus Walleij: https://www.spinics.net/lists/devicetree/msg241973.html to solve it, adding get_set_inv_dir and get_set_multiple_inv_dir I/O functions to call the data register when the direction is input and set register when the direction is output. the functions will linked to the I/O get functions if the user set BGPIOF_INVERTED_REG_DIR flag in the bgpio initialization. Tomer Maimon (1): gpio: mmio: add inverted direction get_set io support drivers/gpio/gpio-mmio.c | 48 ++++++++++++++++++++++++++++++++++++++++++--- include/linux/gpio/driver.h | 1 + 2 files changed, 46 insertions(+), 3 deletions(-) -- 2.14.1