MAJOR=4
MINOR=2
DEVNAME=tty2
  )   ˆl–Ü4ý( ©³( 	Å€fàB¦-ÿÂ‚ž_†I|¥�+ÂÁ  ä    /* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LINUX_MFD_SC27XX_PMIC_H
#define __LINUX_MFD_SC27XX_PMIC_H

extern enum usb_charger_type sprd_pmic_detect_charger_type(struct device *dev);

#endif /* __LINUX_MFD_SC27XX_PMIC_H */
     ˆ¿Ãƒqð½¾ÂÁ     /* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (C) 2017-2018, Intel Corporation
 */

#ifndef __STRATIX10_SVC_CLIENT_H
#define __STRATIX10_SVC_CLIENT_H

/*
 * Service layer driver supports client names
 *
 * fpga: for FPGA configuration
 * rsu: for remote status update
 */
#define SVC_CLIENT_FPGA			"fpga"
#define SVC_CLIENT_RSU			"rsu"

/*
 * Status of the sent command, in bit number
 *
 * SVC_STATUS_OK:
 * Secure firmware accepts the request issued by one of service clients.
 *
 * SVC_STATUS_BUFFER_SUBMITTED:
 * Service client successfully submits data buffer to secure firmware.
 *
 * SVC_STATUS_BUFFER_DONE:
 * Secure firmware completes data process, ready to accept the
 * next WRITE transaction.
 *
 * SVC_STATUS_COMPLETED:
 * Secure firmware completes service request successfully. In case of
 * FPGA configuration, FPGA should be in user mode.
 *
 * SVC_COMMAND_STATUS_BUSY:
 * Service request is still in process.
 *
 * SVC_COMMAND_STATUS_ERROR:
 * Error encountered during the process of the service request.
 *
 * SVC_STATUS_NO_SUPPORT:
 * Secure firmware doesn't support requested features such as RSU retry
 * or RSU notify.
 */
#define SVC_STATUS_OK			0
#define SVC_STATUS_BUFFER_SUBMITTED	1
#define SVC_STATUS_BUFFER_DONE		2
#define SVC_STATUS_COMPLETED		3
#define SVC_STATUS_BUSY			4
#define SVC_STATUS_ERROR		5
#define SVC_STATUS_NO_SUPPORT		6

/*
 * Flag bit for COMMAND_RECONFIG
 *
 * COMMAND_RECONFIG_FLAG_PARTIAL:
 * Set to FPGA configuration type (full or partial).
 */
#define COMMAND_RECONFIG_FLAG_PARTIAL	0

/*
 * Timeout settings for service clients:
 * timeout value used in Stratix10 FPGA manager driver.
 * timeout value used in RSU driver
 */
#define SVC_RECONFIG_REQUEST_TIMEOUT_MS         300
#define SVC_RECONFIG_BUFFER_TIMEOUT_MS          720
#define SVC_RSU_REQUEST_TIMEOUT_MS              300

struct stratix10_svc_chan;

/**
 * enum stratix10_svc_command_code - supported service commands
 *
 * @COMMAND_NOOP: do 'dummy' request for integration/debug/trouble-shooting
 *
 * @COMMAND_RECONFIG: ask for FPGA configuration preparation, return status
 * is SVC_STATUS_OK
 *
 * @COMMAND_RECONFIG_DATA_SUBMIT: submit buffer(s) of bit-stream data for the
 * FPGA configuration, return status is SVC_STATUS_SUBMITTED or SVC_STATUS_ERROR
 *
 * @COMMAND_RECONFIG_DATA_CLAIM: check the status of the configuration, return
 * status is SVC_STATUS_COMPLETED, or SVC_STATUS_BUSY, or SVC_STATUS_ERROR
 *
 * @COMMAND_RECONFIG_STATUS: check the status of the configuration, return
 * status is SVC_STATUS_COMPLETED, or SVC_STATUS_BUSY, or SVC_STATUS_ERROR
 *
 * @COMMAND_RSU_STATUS: request remote system update boot log, return status
 * is log data or SVC_STATUS_RSU_ERROR
 *
 * @COMMAND_RSU_UPDATE: set the offset of the bitstream to boot after reboot,
 * return status is SVC_STATUS_OK or SVC_STATUS_ERROR
 *
 * @COMMAND_RSU_NOTIFY: report the status of hard processor system
 * software to firmware, return status is SVC_STATUS_OK or
 * SVC_STATUS_ERROR
 *
 * @COMMAND_RSU_RETRY: query firmware for the current image's retry counter,
 * return status is SVC_STATUS_OK or SVC_STATUS_ERROR
 *
 * @COMMAND_RSU_MAX_RETRY: query firmware for the max retry value,
 * return status is SVC_STATUS_OK or SVC_STATUS_ERROR
 *
 * @COMMAND_RSU_DCMF_VERSION: query firmware for the DCMF version, return status
 * is SVC_STATUS_OK or SVC_STATUS_ERROR
 */
enum stratix10_svc_command_code {
	COMMAND_NOOP = 0,
	COMMAND_RECONFIG,
	COMMAND_RECONFIG_DATA_SUBMIT,
	COMMAND_RECONFIG_DATA_CLAIM,
	COMMAND_RECONFIG_STATUS,
	COMMAND_RSU_STATUS,
	COMMAND_RSU_UPDATE,
	COMMAND_RSU_NOTIFY,
	COMMAND_RSU_RETRY,
	COMMAND_RSU_MAX_RETRY,
	COMMAND_RSU_DCMF_VERSION,
};

/**
 * struct stratix10_svc_client_msg - message sent by client to service
 