lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ba6420c5-37d3-205a-19e0-957e77f7e9f7@codeaurora.org>
Date:   Mon, 15 Jun 2020 21:27:08 -0700
From:   Wesley Cheng <wcheng@...eaurora.org>
To:     Mark Brown <broonie@...nel.org>
Cc:     robh+dt@...nel.org, heikki.krogerus@...ux.intel.com,
        gregkh@...uxfoundation.org, mark.rutland@....com,
        lgirdwood@...il.com, agross@...nel.org, bjorn.andersson@...aro.org,
        linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
        devicetree@...r.kernel.org, linux-usb@...r.kernel.org,
        lijun.kernel@...il.com, rdunlap@...radead.org,
        jackp@...eaurora.org, bryan.odonoghue@...aro.org
Subject: Re: [PATCH v2 4/6] regulator: Add support for QCOM PMIC VBUS booster



On 6/15/2020 5:00 AM, Mark Brown wrote:
> 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.
> 

Hi Mark,

Sure, will do.

>> +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.
> 

Got it.  This simplifies the driver a lot.  Thanks for the tip.

>> +	init_data.constraints.valid_ops_mask |= REGULATOR_CHANGE_STATUS;
> 
> No, this is broken - regulators should not override the constraints the
> machine sets.
> 

Understood.  I decided to go with of_get_regulator_init_data() to
initialize the init_data parameter.  This should take care of the
constraint settings.


-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ