habanalabs: allow reset upon device release
authorOfir Bitton <obitton@habana.ai>
Tue, 8 Jun 2021 14:24:52 +0000 (17:24 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 21 Jun 2021 07:14:34 +0000 (10:14 +0300)
commit23bace677a3d928b388b6204d64c08b8c6fd468c
tree826da504f0cd12c15ca076cf73f0ee601a58ccea
parent4d041216c83dd9933c7c72b40511bb3585fa1724
habanalabs: allow reset upon device release

We introduce a new type of reset which is reset upon device release.
This reset is very similar to soft reset except the fact it is
performed only upon device release and not upon user sysfs request
nor TDR.

The purpose of this reset is to make sure the device is returned to
IDLE state after the current user has finished working with the device.

Signed-off-by: Ofir Bitton <obitton@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/device.c
drivers/misc/habanalabs/common/habanalabs.h
drivers/misc/habanalabs/common/sysfs.c
drivers/misc/habanalabs/goya/goya.c