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]
Date:	Fri, 10 Oct 2014 10:14:26 +0200
From:	Philipp Zabel <p.zabel@...gutronix.de>
To:	dinguyen@...nsource.altera.com
Cc:	dinh.linux@...il.com, atull@...nsource.altera.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCHv2] reset: add reset_control_status helper function

Hi Dinh,

you forgot one s/^+unsigned int/+int/ below.

Am Donnerstag, den 09.10.2014, 15:44 -0500 schrieb dinguyen@...nsource.altera.com:
[...]
> @@ -126,6 +126,19 @@ int reset_control_deassert(struct reset_control *rstc)
>  EXPORT_SYMBOL_GPL(reset_control_deassert);
>  
>  /**
> + * reset_control_status - returns a status of a reset bit
> + * @rstc: reset controller

+ *
+ * Returns a negative errno if not supported, a positive value if the reset
+ * line is asserted, or zero if the reset line is not asserted.

Maybe add something like this?

[...]
> diff --git a/include/linux/reset-controller.h b/include/linux/reset-controller.h
> index 41a4695..ce6b962 100644
> --- a/include/linux/reset-controller.h
> +++ b/include/linux/reset-controller.h
> @@ -12,11 +12,13 @@ struct reset_controller_dev;
>   *         things to reset the device
>   * @assert: manually assert the reset line, if supported
>   * @deassert: manually deassert the reset line, if supported
> + * @status: return the status of the reset line, if supported
>   */
>  struct reset_control_ops {
>  	int (*reset)(struct reset_controller_dev *rcdev, unsigned long id);
>  	int (*assert)(struct reset_controller_dev *rcdev, unsigned long id);
>  	int (*deassert)(struct reset_controller_dev *rcdev, unsigned long id);
> +	int (*status)(struct reset_controller_dev *rcdev, unsigned long id);
>  };
>  
>  struct module;
> diff --git a/include/linux/reset.h b/include/linux/reset.h
> index 349f150..f7c76f2 100644
> --- a/include/linux/reset.h
> +++ b/include/linux/reset.h
> @@ -10,6 +10,7 @@ struct reset_control;
>  int reset_control_reset(struct reset_control *rstc);
>  int reset_control_assert(struct reset_control *rstc);
>  int reset_control_deassert(struct reset_control *rstc);
> +unsigned int reset_control_status(struct reset_control *rstc);

int
 
>  struct reset_control *reset_control_get(struct device *dev, const char *id);
>  void reset_control_put(struct reset_control *rstc);
[...]

regards
Philipp

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ