Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpi5: add pinctrl and scmi pinctrl Pin control protocol support #15

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions drivers/scmi-msg/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "clock.h"
#include "power_domain.h"
#include "reset_domain.h"
#include "scmi_pinctrl.h"
#include "sensor.h"

#define SCMI_VERSION 0x20000U
Expand Down Expand Up @@ -126,6 +127,13 @@ scmi_msg_handler_t scmi_msg_get_pd_handler(struct scmi_msg *msg);
*/
scmi_msg_handler_t scmi_msg_get_sensor_handler(struct scmi_msg *msg);

/*
* scmi_msg_get_pinctrl_handler - Return a handler for a pinctrl message
* @msg - message to process
* Return a function handler for the message or NULL
*/
scmi_msg_handler_t scmi_msg_get_pinctrl_handler(struct scmi_msg *msg);

/*
* Process Read, process and write response for input SCMI message
*
Expand Down
9 changes: 9 additions & 0 deletions drivers/scmi-msg/entry.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#pragma weak scmi_msg_get_pd_handler
#pragma weak scmi_msg_get_voltage_handler
#pragma weak scmi_msg_get_sensor_handler
#pragma weak scmi_msg_get_pinctrl_handler

scmi_msg_handler_t scmi_msg_get_clock_handler(struct scmi_msg *msg __unused)
{
Expand All @@ -42,6 +43,11 @@ scmi_msg_handler_t scmi_msg_get_sensor_handler(struct scmi_msg *msg __unused)
return NULL;
}

scmi_msg_handler_t scmi_msg_get_pinctrl_handler(struct scmi_msg *msg __unused)
{
return NULL;
}

void scmi_status_response(struct scmi_msg *msg, int32_t status)
{
assert(msg->out && msg->out_size >= sizeof(int32_t));
Expand Down Expand Up @@ -84,6 +90,9 @@ void scmi_process_message(struct scmi_msg *msg)
case SCMI_PROTOCOL_ID_SENSOR:
handler = scmi_msg_get_sensor_handler(msg);
break;
case SCMI_PROTOCOL_ID_PINCTRL:
handler = scmi_msg_get_pinctrl_handler(msg);
break;
default:
break;
}
Expand Down
Loading