diff --git a/dde_linux/src/lib/usb/arm/platform_arndale/platform.cc b/dde_linux/src/lib/usb/arm/platform_arndale/platform.cc index 0fb24c3b8..280f460ab 100644 --- a/dde_linux/src/lib/usb/arm/platform_arndale/platform.cc +++ b/dde_linux/src/lib/usb/arm/platform_arndale/platform.cc @@ -266,10 +266,10 @@ static void arndale_xhci_init() { /* enable USB3 clock and power up */ Regulator::Connection reg_clk(Regulator::CLK_USB30); - reg_clk.set_state(true); + reg_clk.state(true); Regulator::Connection reg_pwr(Regulator::PWR_USB30); - reg_pwr.set_state(true); + reg_pwr.state(true); /* setup PHY */ Attached_io_mem_dataspace io_phy(DWC3_PHY_BASE, 0x1000); diff --git a/os/include/regulator/component.h b/os/include/regulator/component.h index fc9f12fa1..f9ae52663 100644 --- a/os/include/regulator/component.h +++ b/os/include/regulator/component.h @@ -53,10 +53,10 @@ class Regulator::Session_component : public Regulator::Session_rpc_object ** Regulator session interface ** ***********************************/ - void set_level(unsigned long level) { _driver.set_level(_id, level); } - unsigned long level() { return _driver.level(_id); } - void set_state(bool enable) { _driver.set_state(_id, enable); } - bool state() { return _driver.state(_id); } + void level(unsigned long level) { _driver.level(_id, level); } + unsigned long level() { return _driver.level(_id); } + void state(bool enable) { _driver.state(_id, enable); } + bool state() { return _driver.state(_id); } }; diff --git a/os/include/regulator/driver.h b/os/include/regulator/driver.h index d5b249374..56412ede6 100644 --- a/os/include/regulator/driver.h +++ b/os/include/regulator/driver.h @@ -23,10 +23,10 @@ namespace Regulator { */ struct Driver { - virtual void set_level(Regulator_id id, unsigned long level) = 0; - virtual unsigned long level(Regulator_id id) = 0; - virtual void set_state(Regulator_id id, bool enable) = 0; - virtual bool state(Regulator_id id) = 0; + virtual void level(Regulator_id id, unsigned long level) = 0; + virtual unsigned long level(Regulator_id id) = 0; + virtual void state(Regulator_id id, bool enable) = 0; + virtual bool state(Regulator_id id) = 0; }; diff --git a/os/include/regulator_session/client.h b/os/include/regulator_session/client.h index 69dcf9e0f..de7ea25f7 100644 --- a/os/include/regulator_session/client.h +++ b/os/include/regulator_session/client.h @@ -36,10 +36,10 @@ namespace Regulator { ** Regulator session interface ** *********************************/ - void set_level(unsigned long level) { call(level); } - unsigned long level() { return call(); } - void set_state(bool enable) { call(enable); } - bool state() { return call(); } + void level(unsigned long level) { call(level); } + unsigned long level() { return call(); } + void state(bool enable) { call(enable); } + bool state() { return call(); } }; } diff --git a/os/include/regulator_session/regulator_session.h b/os/include/regulator_session/regulator_session.h index 9685273cc..ec500ccfe 100644 --- a/os/include/regulator_session/regulator_session.h +++ b/os/include/regulator_session/regulator_session.h @@ -27,31 +27,31 @@ namespace Regulator { /** * Set regulator specific level */ - virtual void set_level(unsigned long level) = 0; + virtual void level(unsigned long level) = 0; /** * Returns current regulator level */ - virtual unsigned long level() = 0; + virtual unsigned long level() = 0; /** * Enable/disable regulator */ - virtual void set_state(bool enable) = 0; + virtual void state(bool enable) = 0; /** * Returns whether regulator is enabled or not */ - virtual bool state() = 0; + virtual bool state() = 0; /******************* ** RPC interface ** *******************/ - GENODE_RPC(Rpc_set_level, void, set_level, unsigned long); + GENODE_RPC(Rpc_set_level, void, level, unsigned long); GENODE_RPC(Rpc_level, unsigned long, level); - GENODE_RPC(Rpc_set_state, void, set_state, bool); + GENODE_RPC(Rpc_set_state, void, state, bool); GENODE_RPC(Rpc_state, bool, state); GENODE_RPC_INTERFACE(Rpc_set_level, Rpc_level, Rpc_set_state, Rpc_state); }; diff --git a/os/src/app/cli_monitor/foc/extension.cc b/os/src/app/cli_monitor/foc/extension.cc index 40b064e9a..244e028b6 100644 --- a/os/src/app/cli_monitor/foc/extension.cc +++ b/os/src/app/cli_monitor/foc/extension.cc @@ -90,7 +90,7 @@ struct Cpufreq_command : Command unsigned long f = 0; Genode::ascii_to(freq, &f, 10); tprintf(terminal, "set frequency to %ld Hz\n", f); - regulator.set_level(f); + regulator.level(f); } }; diff --git a/os/src/drivers/platform/arndale/cmu.h b/os/src/drivers/platform/arndale/cmu.h index 121217de5..1501b170f 100644 --- a/os/src/drivers/platform/arndale/cmu.h +++ b/os/src/drivers/platform/arndale/cmu.h @@ -440,7 +440,7 @@ class Cmu : public Regulator::Driver, ** Regulator driver interface ** ********************************/ - void set_level(Regulator_id id, unsigned long level) + void level(Regulator_id id, unsigned long level) { switch (id) { case CLK_CPU: @@ -465,7 +465,7 @@ class Cmu : public Regulator::Driver, return 0; } - void set_state(Regulator_id id, bool enable) + void state(Regulator_id id, bool enable) { if (enable) _enable(id); diff --git a/os/src/drivers/platform/arndale/pmu.h b/os/src/drivers/platform/arndale/pmu.h index 1aa38a15e..eeaf53278 100644 --- a/os/src/drivers/platform/arndale/pmu.h +++ b/os/src/drivers/platform/arndale/pmu.h @@ -157,7 +157,7 @@ class Pmu : public Regulator::Driver, ** Regulator driver interface ** ********************************/ - void set_level(Regulator_id id, unsigned long level) + void level(Regulator_id id, unsigned long level) { switch (id) { default: @@ -174,7 +174,7 @@ class Pmu : public Regulator::Driver, return 0; } - void set_state(Regulator_id id, bool enable) + void state(Regulator_id id, bool enable) { switch (id) { case PWR_USB30: diff --git a/os/src/drivers/sd_card/exynos5/main.cc b/os/src/drivers/sd_card/exynos5/main.cc index 641ed560d..7fc9c29ad 100644 --- a/os/src/drivers/sd_card/exynos5/main.cc +++ b/os/src/drivers/sd_card/exynos5/main.cc @@ -50,7 +50,7 @@ int main(int argc, char **argv) static Cap_connection cap; static Rpc_entrypoint ep(&cap, STACK_SIZE, "block_ep"); static Regulator::Connection mmc0_regulator(Regulator::CLK_MMC0); - mmc0_regulator.set_state(true); + mmc0_regulator.state(true); static Block::Root block_root(&ep, env()->heap(), driver_factory); env()->parent()->announce(ep.manage(&block_root)); diff --git a/os/src/test/cpufreq/main.cc b/os/src/test/cpufreq/main.cc index c6b35e994..7a40ac945 100644 --- a/os/src/test/cpufreq/main.cc +++ b/os/src/test/cpufreq/main.cc @@ -33,8 +33,8 @@ int main(int argc, char **argv) while (true) { timer.msleep(10000); PINF("Setting CPU frequency %s", high ? "low" : "high"); - cpu_regulator.set_level(high ? Regulator::CPU_FREQ_200 - : Regulator::CPU_FREQ_1600); + cpu_regulator.level(high ? Regulator::CPU_FREQ_200 + : Regulator::CPU_FREQ_1600); high = !high; }