From patchwork Wed Aug 24 23:24:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 74635 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp557738qga; Wed, 24 Aug 2016 16:25:12 -0700 (PDT) X-Received: by 10.66.161.195 with SMTP id xu3mr10508567pab.68.1472081112458; Wed, 24 Aug 2016 16:25:12 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id um11si11892925pab.133.2016.08.24.16.25.12 for ; Wed, 24 Aug 2016 16:25:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-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-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933230AbcHXXYu (ORCPT ); Wed, 24 Aug 2016 19:24:50 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:36422 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933166AbcHXXYr (ORCPT ); Wed, 24 Aug 2016 19:24:47 -0400 Received: by mail-oi0-f67.google.com with SMTP id b22so3052325oii.3; Wed, 24 Aug 2016 16:24:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Mu2RwjOWd5qGHGTgefANtWuwHmlCHMbIUuyCBRwZ8Ow=; b=INbeJ1cNxOinEZMnojd6rkC7RLBzVYFnSB4mEQoi3Sfld0fY1h1NDDc6AQfJlQ/8l0 Cd5SilSc7Z/fKBhNVYcSoaSY+y9cONUubqM1LUKEi17TdeVlEYxpwS0dj8jm24NVI0dM inw/tHa/W+achgFiUBRuYpeimQUq/QyeA9VUDLhlGU+W/m+LyjfZlQOimgkd67qrKi3x eCDMirTQThXvrP3k2xdJdXpfuVsTMskgnLOb+p2pmNvID/em/b3ymWxmH4WPf/Z0kafo GOFFhufX92cnQLLivUnQcW5tFDlX4u508OxIKu/sc44uSWbwgepIP22303VKP9DS1FiW 9EjQ== X-Gm-Message-State: AEkooutTEgx4+OGYT108e94Ye1g8GN5RBNabtEN/pI1rJnUf6eF/1VCvZVOLY3BH4SAOBQ== X-Received: by 10.202.181.84 with SMTP id e81mr4533450oif.126.1472081086213; Wed, 24 Aug 2016 16:24:46 -0700 (PDT) Received: from rob-hp-laptop.herring.priv (72-48-98-129.dyn.grandenetworks.net. [72.48.98.129]) by smtp.googlemail.com with ESMTPSA id a5sm1322910oii.3.2016.08.24.16.24.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 Aug 2016 16:24:45 -0700 (PDT) From: Rob Herring To: Greg Kroah-Hartman , Marcel Holtmann , Jiri Slaby , Sebastian Reichel , Arnd Bergmann , "Dr . H . Nikolaus Schaller" , Alan Cox Cc: Loic Poulain , Pavel Machek , Peter Hurley , NeilBrown , Linus Walleij , linux-bluetooth@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 5/6] serio: add serial configuration functions Date: Wed, 24 Aug 2016 18:24:36 -0500 Message-Id: <20160824232437.9446-7-robh@kernel.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20160824232437.9446-1-robh@kernel.org> References: <20160824232437.9446-1-robh@kernel.org> Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Just stub functions ATM. Signed-off-by: Rob Herring --- include/linux/serio.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/serio.h b/include/linux/serio.h index 5d0b69f..5bf1754 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h @@ -41,6 +41,8 @@ struct serio { void (*close)(struct serio *); int (*start)(struct serio *); void (*stop)(struct serio *); + void (*set_flow_control)(struct serio *, bool); + unsigned int (*set_baudrate)(struct serio *, unsigned int); struct serio *parent; /* Entry in parent->children list */ @@ -170,6 +172,20 @@ static inline void serio_drv_write_wakeup(struct serio *serio) serio->drv->write_wakeup(serio); } +static inline void serio_set_flow_control(struct serio *serio, bool enable) +{ + if (serio->set_flow_control) + serio->set_flow_control(serio, enable); +} + +static inline unsigned int serio_set_baudrate(struct serio *serio, unsigned int speed) +{ + if (serio->set_baudrate) + return serio->set_baudrate(serio, speed); + + return 0; +} + /* * Use the following functions to manipulate serio's per-port * driver-specific data.