Re: [PATCH net-next v5 13/17] net: pse-pd: Use regulator framework within PSE framework

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

 



On Tue, Feb 27, 2024 at 03:42:55PM +0100, Kory Maincent wrote:

...

> diff --git a/include/linux/pse-pd/pse.h b/include/linux/pse-pd/pse.h
> index 522115cc6cef..a3e297cc2150 100644
> --- a/include/linux/pse-pd/pse.h
> +++ b/include/linux/pse-pd/pse.h
> @@ -55,10 +55,10 @@ struct pse_controller_ops {
>  	int (*ethtool_get_status)(struct pse_controller_dev *pcdev,
>  		unsigned long id, struct netlink_ext_ack *extack,
>  		struct pse_control_status *status);
> -	int (*ethtool_set_config)(struct pse_controller_dev *pcdev,
> -		unsigned long id, struct netlink_ext_ack *extack,
> -		const struct pse_control_config *config);
>  	int (*setup_pi_matrix)(struct pse_controller_dev *pcdev);
> +	int (*pi_is_enabled)(struct pse_controller_dev *pcdev, int id);
> +	int (*pi_enable)(struct pse_controller_dev *pcdev, int id);
> +	int (*pi_disable)(struct pse_controller_dev *pcdev, int id);

Hi Kory,

Please update the Kernel doc for struct pse_controller_ops to reflect the
added and removed fields.

>  };
>  
>  struct module;
> @@ -90,10 +90,14 @@ struct pse_pi_pairset {
>   *
>   * @pairset: table of the PSE PI pinout alternative for the two pairset
>   * @np: device node pointer of the PSE PI node
> + * @rdev: regulator represented by the PSE PI
> + * @enabled: PI enabled state
>   */
>  struct pse_pi {
>  	struct pse_pi_pairset pairset[2];
>  	struct device_node *np;
> +	struct regulator_dev *rdev;
> +	bool enabled;
>  };
>  
>  /**
> @@ -107,6 +111,8 @@ struct pse_pi {
>   * @of_pse_n_cells: number of cells in PSE line specifiers
>   * @nr_lines: number of PSE controls in this controller device
>   * @lock: Mutex for serialization access to the PSE controller
> + * @lock_owner: current owner of the mutex
> + * @ref_cnt: mutex's reference count

These newly documented fields don't seem to exist in struct
pse_controller_dev. Perhaps this is an left over from earlier development?

>   * @types: types of the PSE controller
>   * @pi: table of PSE PIs described in this controller device
>   * @of_legacy: flag set if the pse_pis devicetree node is not used
> @@ -132,7 +138,8 @@ struct device;
>  int devm_pse_controller_register(struct device *dev,
>  				 struct pse_controller_dev *pcdev);
>  
> -struct pse_control *of_pse_control_get(struct device_node *node);
> +struct pse_control *of_pse_control_get(struct device *dev,
> +				       struct device_node *node);
>  void pse_control_put(struct pse_control *psec);
>  
>  int pse_ethtool_get_status(struct pse_control *psec,
> @@ -147,7 +154,8 @@ bool pse_has_c33(struct pse_control *psec);
>  
>  #else
>  
> -static inline struct pse_control *of_pse_control_get(struct device_node *node)
> +static inline struct pse_control *of_pse_control_get(struct device *dev,
> +						     struct device_node *node)
>  {
>  	return ERR_PTR(-ENOENT);
>  }
> 
> -- 
> 2.25.1
> 
> 




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux