Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp597187ybx; Tue, 5 Nov 2019 02:32:04 -0800 (PST) X-Google-Smtp-Source: APXvYqwc1LqvOYuXpSfdk3M90kknzqH32oHw7kM87Y8kzVDs4ZkD9BoUTfzKS5aUJj4tM/ErIgLy X-Received: by 2002:a17:906:f191:: with SMTP id gs17mr16921429ejb.207.1572949924716; Tue, 05 Nov 2019 02:32:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572949924; cv=none; d=google.com; s=arc-20160816; b=IbaRhsORYGFht0BOkB9DjD/HFY+MpD/CtQYScyHjj9czLYM7L1iKJgnT4eBiOrQACD DfTU/KeHKToKOdsJlIfekKgd+cVU89qeTcZLE9Nx6ANi+O9f97iuwUHITDkb65PRMYCI tKpiG3GiGI4sFMmit/PKdE57W7WdKzGHf0tv7jH449vrH8W0dspD8x+thrstAQYd+s4J 87k44a5/dcGXNOeelS+ySWp3+piDfJEEyi4fmDQsWb7tltDBlU63/HVVeeUETLD0YMyJ AeNEBY+TrH9ccHDqsy64Gh5iZc2DozD3DUjC2BjRQOH7drY4KEb2qpXOeO4NqTfXdNx7 F7fw== 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:message-id:subject:cc :to:from:date; bh=ggSCNAhKWDAQfnI1StH0nU3POuONxOaNf53ZjEk0tRo=; b=JOf64TaQx8nT7ETfig6QF6XCe5VgvMqN0/WvGSuLBv8ixTokxgm7Xk+nksNMd6cnZS C92MQ8AE+CoD41VbsXP6Hvd4C3nCVNoaPp1l1koZjm68147SjVTsbkvNsIqmgP7bFnpB 5uq/0tiXZNLM/wiPdCm6ipld3ygkynZ3jWBj2d6Ii3o4bTOi1tLiu2AnMKPgeE6QkLFF /9u4cKeCit99xOA0ehlklQ6UwDegrZyEJYtg9ocawD6m/1EWQWp3EZUqSaBNt71unH4G lNPbTRvxK0tsM4T5JlgQR93gGkw2h7U6K1Cr+S3hFxwxGrrmoLjwtu6Rzdl6ECnPISFP 79GQ== 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 p15si10093020edi.27.2019.11.05.02.31.40; Tue, 05 Nov 2019 02:32:04 -0800 (PST) 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 S2388452AbfKEKbL (ORCPT + 99 others); Tue, 5 Nov 2019 05:31:11 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:44250 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388093AbfKEKbK (ORCPT ); Tue, 5 Nov 2019 05:31:10 -0500 Received: by mail-lj1-f196.google.com with SMTP id g3so15056548ljl.11; Tue, 05 Nov 2019 02:31:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ggSCNAhKWDAQfnI1StH0nU3POuONxOaNf53ZjEk0tRo=; b=kXA47VE1jn35t7REZkc4DfgsBLUShx5soMmHRDa2ywLDOQJ9LY7pLoj10S9OVHeAOO uPm+OV9QxpJ20f8TFaHwrmyXa5JjxzAg5fckC/6mwZpaITIjmCJ/Br4TwPWdK3jpc7ip 13liA0mLqcpp5JEnktahH9Dix9M8qZ22G/w5IeYqxe7wyAPrBRlPJl6nOxz9vaYQX0RW 8RFs6+ZwNHAWg17ymvVoYhGnBL+sY2475lHoMV5WoVkeZAQQbKSAFEdB1CPAPdB2zkzN uP2GI8rSTUuWKTZD78vIn3DFs88cluXxd4nUJLv9BCALNo6GOZQuLlCYuJ2s4TN35WOe k9Fg== X-Gm-Message-State: APjAAAXdUptCPQiicshlSZYyLjiiz5ZtE9LjhjmhmFDwh5H4vVzxoq1O 9K6R1xxU+tBzFD/8SSkH0FE= X-Received: by 2002:a2e:9016:: with SMTP id h22mr14151346ljg.137.1572949868198; Tue, 05 Nov 2019 02:31:08 -0800 (PST) Received: from localhost.localdomain ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id k19sm8781244ljg.18.2019.11.05.02.31.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Nov 2019 02:31:07 -0800 (PST) Date: Tue, 5 Nov 2019 12:30:58 +0200 From: Matti Vaittinen To: matti.vaittinen@fi.rohmeurope.com, mazziesaccount@gmail.com Cc: Thorsten Scherer , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Pengutronix Kernel Team , Linus Walleij , Bartosz Golaszewski , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 40/62] gpio: gpio-siox: Use new GPIO_LINE_DIRECTION Message-ID: <91a796dd2811b58f4be30875f5ef644f0e43f241.1572945896.git.matti.vaittinen@fi.rohmeurope.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It's hard for occasional GPIO code reader/writer to know if values 0/1 equal to IN or OUT. Use defined GPIO_LINE_DIRECTION_IN and GPIO_LINE_DIRECTION_OUT to help them out. Signed-off-by: Matti Vaittinen --- drivers/gpio/gpio-siox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-siox.c b/drivers/gpio/gpio-siox.c index 006a7e6a75f2..311f66757b92 100644 --- a/drivers/gpio/gpio-siox.c +++ b/drivers/gpio/gpio-siox.c @@ -203,9 +203,9 @@ static int gpio_siox_direction_output(struct gpio_chip *chip, static int gpio_siox_get_direction(struct gpio_chip *chip, unsigned int offset) { if (offset < 12) - return 1; /* input */ + return GPIO_LINE_DIRECTION_IN; else - return 0; /* output */ + return GPIO_LINE_DIRECTION_OUT; } static int gpio_siox_probe(struct siox_device *sdevice) -- 2.21.0 -- Matti Vaittinen, Linux device drivers ROHM Semiconductors, Finland SWDC Kiviharjunlenkki 1E 90220 OULU FINLAND ~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~ Simon says - in Latin please. ~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~ Thanks to Simon Glass for the translation =]