Re: [PATCHv3 3/6] regulator: omap smps regulator driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, Jul 18, 2011 at 08:35:19PM +0300, Tero Kristo wrote:
> diff --git a/drivers/regulator/omap-smps-regulator.c b/drivers/regulator/omap-smps-regulator.c
> new file mode 100644
> index 0000000..8b56e4f
> --- /dev/null
> +++ b/drivers/regulator/omap-smps-regulator.c
> @@ -0,0 +1,179 @@
> +/*
> + * omap-vp-regulator.c -- support SMPS regulators for OMAP chips

name is wrong here.

> + *
> + * Copyright (C) 2011 Texas Instruments, Inc.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/ctype.h>
> +#include <linux/module.h>
> +#include <linux/slab.h>
> +#include <linux/init.h>
> +#include <linux/err.h>
> +#include <linux/delay.h>
> +#include <linux/platform_device.h>
> +#include <linux/regulator/driver.h>
> +#include <linux/regulator/machine.h>
> +#include <linux/regulator/omap-smps.h>
> +#include <plat/voltage.h>
> +
> +#define DRIVER_NAME		"omap-smps"
> +
> +struct omap_smps_reg_info {
> +	const char		*vdd_name;
> +	struct regulator_dev	*rdev;
> +	struct voltagedomain	*voltdm;
> +	struct regulator_desc	desc;
> +};
> +
> +static int omap_smps_set_voltage(struct regulator_dev *rdev, int min_uV,
> +				    int max_uV, unsigned *selector)
> +{
> +	struct omap_smps_reg_info	*info = rdev_get_drvdata(rdev);
> +	return voltdm_scale(info->voltdm, min_uV);
> +}
> +
> +static int omap_smps_get_voltage(struct regulator_dev *rdev)
> +{
> +	struct omap_smps_reg_info	*info = rdev_get_drvdata(rdev);
> +	return omap_vp_get_curr_volt(info->voltdm);
> +}
> +
> +static struct regulator_ops omap_smps_ops = {

should this be const ?

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux