Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Oct 2019 09:54:12 +0000 (UTC)
From:      Emmanuel Vadot <manu@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r353917 - head/sys/dev/extres/regulator
Message-ID:  <201910230954.x9N9sCcH087737@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: manu
Date: Wed Oct 23 09:54:12 2019
New Revision: 353917
URL: https://svnweb.freebsd.org/changeset/base/353917

Log:
  regulator: Add a regnode_method_init
  
  This is a default init method for regulator that don't really
  need one.
  
  MFC after:	1 week

Modified:
  head/sys/dev/extres/regulator/regulator.c

Modified: head/sys/dev/extres/regulator/regulator.c
==============================================================================
--- head/sys/dev/extres/regulator/regulator.c	Wed Oct 23 07:36:26 2019	(r353916)
+++ head/sys/dev/extres/regulator/regulator.c	Wed Oct 23 09:54:12 2019	(r353917)
@@ -65,6 +65,7 @@ typedef TAILQ_HEAD(regnode_list, regnode) regnode_list
 typedef TAILQ_HEAD(regulator_list, regulator) regulator_list_t;
 
 /* Default regulator methods. */
+static int regnode_method_init(struct regnode *regnode);
 static int regnode_method_enable(struct regnode *regnode, bool enable,
     int *udelay);
 static int regnode_method_status(struct regnode *regnode, int *status);
@@ -77,6 +78,7 @@ static void regulator_shutdown(void *dummy);
  * Regulator controller methods.
  */
 static regnode_method_t regnode_methods[] = {
+	REGNODEMETHOD(regnode_init,		regnode_method_init),
 	REGNODEMETHOD(regnode_enable,		regnode_method_enable),
 	REGNODEMETHOD(regnode_status,		regnode_method_status),
 	REGNODEMETHOD(regnode_set_voltage,	regnode_method_set_voltage),
@@ -212,6 +214,13 @@ regnode_uvolt_sysctl(SYSCTL_HANDLER_ARGS)
  * Default regulator methods for base class.
  *
  */
+static int
+regnode_method_init(struct regnode *regnode)
+{
+
+	return (0);
+}
+
 static int
 regnode_method_enable(struct regnode *regnode, bool enable, int *udelay)
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910230954.x9N9sCcH087737>