lkml.org 
[lkml]   [2020]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 4/6] regulator: Add support for QCOM PMIC VBUS booster
On Fri, Jun 12, 2020 at 04:19:16PM -0700, Wesley Cheng wrote:

> +++ b/drivers/regulator/qcom_usb_vbus-regulator.c
> @@ -0,0 +1,147 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (c) 2020, The Linux Foundation. All rights reserved.
> + */

Please make the entire comment a C++ one so things look more
intentional.

> +static int qcom_usb_vbus_enable(struct regulator_dev *rdev)
> +{

> +static int qcom_usb_vbus_disable(struct regulator_dev *rdev)
> +{

> +static int qcom_usb_vbus_is_enabled(struct regulator_dev *rdev)
> +{

These operations can all be replaced by regulator_is_enabled_regmap()
and friends.

> + init_data.constraints.valid_ops_mask |= REGULATOR_CHANGE_STATUS;

No, this is broken - regulators should not override the constraints the
machine sets.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-06-15 14:00    [W:0.070 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site