Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 506d79df authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm/msm/sde: add sde wrapper for clock set flags" into dev/msm-4.14-display

parents d1280f8c e0a08db1
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -1087,6 +1087,30 @@ struct clk *sde_power_clk_get_clk(struct sde_power_handle *phandle,
	return clk;
}

int sde_power_clk_set_flags(struct sde_power_handle *phandle,
		char *clock_name, unsigned long flags)
{
	struct clk *clk;

	if (!phandle) {
		pr_err("invalid input power handle\n");
		return -EINVAL;
	}

	if (!clock_name) {
		pr_err("invalid input clock name\n");
		return -EINVAL;
	}

	clk = sde_power_clk_get_clk(phandle, clock_name);
	if (!clk) {
		pr_err("get_clk failed for clk: %s\n", clock_name);
		return -EINVAL;
	}

	return clk_set_flags(clk, flags);
}

struct sde_power_event *sde_power_handle_register_event(
		struct sde_power_handle *phandle,
		u32 event_type, void (*cb_fnc)(u32 event_type, void *usr),
+12 −1
Original line number Diff line number Diff line
/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -285,6 +285,17 @@ u64 sde_power_clk_get_max_rate(struct sde_power_handle *pdata,
struct clk *sde_power_clk_get_clk(struct sde_power_handle *phandle,
		char *clock_name);

/**
 * sde_power_clk_set_flags() - set the clock flags
 * @pdata:  power handle containing the resources
 * @clock_name: clock name to get the clk pointer.
 * @flags: flags to set
 *
 * Return: error code.
 */
int sde_power_clk_set_flags(struct sde_power_handle *pdata,
		char *clock_name, unsigned long flags);

/**
 * sde_power_data_bus_set_quota() - set data bus quota for power client
 * @phandle:  power handle containing the resources